Le 06-01-2010, à 16:22:58 +0100, Toby Cubitt (ts...@cantab.net) a écrit :
> > > On 06Jan2010 10:36, steve <dl...@bluewin.ch> wrote: > > > > At work, I use mutt via a ssh tunnel (with putty). So mutt is running on > > > > my home server (Debian). Sometimes I need to attach files located not on > > > > my (remote) server but on my local windows box. So what I do is to send > > > > myself the files using my work's email account, save it on the remote > > > > server and then attach them in mutt; not the best solution but it works. > > > > > > > > I'd like to know if it's possible to attach files directly from the > > > > local machine. > > > > > > Since you're already using ssh tunnels, you could try using the sshfs > > > filesystem to mount your windows directories remotely on your server. > > > sshfs is available for Debian, and I believe it should be able to mount > > > directories hosted on a windows system just as easily as anything else. > > > > > > Of course, for this to work you'd have to run an ssh server on your > > > *windows* box > > > > I guess it will be difficult (read forbidden) to that at work. > > Yes, I wrote that before you're follow-up post mentioning that the > windows box was at work and locked down. Yep :-) > > > (and it would have to be visible over the network from your > > > server). But running an ssh server on your windows box might be a bit > > > easier than setting up a sambda share. > > > > So a Samba share is the only solution left? > > Using samba would be a sledgehammer of a solution. In any case, if > running an ssh server is forbidden/impossible, setting up a samba share > isn't going to be allowed either. That makes sense. > (Though I suppose you could always ask > -- there's no accounting for the logic of corporate IT policy sometimes!) I prefer not trying.. > The trouble is, mutt can only attach files on the local filesystem (as > far as I know). So to attach a remote file requires either transferring > the file to the computer running mutt, or some way of mounting the remote > filesystem over the network. As another poster has already pointed out, > the former can be achieved with the scp or sftp clients from the PuTTY > suite (since you can run putty, you should have no trouble running pscp > or psftp). Well I read that documentation, created a public/private key pair, works perfectly with putty. But not with sftp nor with pscp, I get a line: sshd: subsystem request for sftp in the logs and nothing happens. I tried to sftp into my server using filezilla, and same thing. > A remote mount is slightly more convenient, as it avoids having to first > manually copy the file across the network before attaching it. But this > is inevitably going to require some kind of server to be running on the > computer hosting the file, be it SSH, or windows itself serving a samba > share. (If you're behind a firewall and can only ssh *out*, then it also > requires some nifty ssh remote port-forwarding to tunnel a connection > *back* from your home server to your work computer.) Yes, and this is not in my plans (yet). > However, since it seems running any kind of server on your work computer > is impossible for you, you're probably better off living with > transferring the file by scp or sftp. Or by email (as I'm currently doing). I arrived to the same conclusion. Thank you very much for your details explanations. Have a nice day, Steve