From: Brian Candler Date: 2009-12-26T23:50:19+09:00 Subject: Re: pasing data between 2 win XP boxes via internet Dave Lilley wrote: > Can you help with a PuTTy (plink & ruby) connection? I think PuTTY and plink are red herrings here. PuTTY is a console ssh client: i.e. once the connection is established, you have to type things into it at the keyboard, and it displays the responses in a window. plink allows you to script the setting up of this interactive session. Neither of these is an ssh server, and neither of them would allow you to use ruby to send and receive data (unless you're talking about forwarding a TCP connection through an ssh port-forwarding tunnel, which I don't think you are). As I said before, you first need to decide what you're attempting to do: something using ssh, or something which is a pure Ruby solution like HTTPS. I actually think that ssh is a good solution - it's robust, secure and well known / well trusted. But to do this, you'll need an ssh server on one side - for example Cygwin. Once you have this in place, you can use putty/pscp/psftp from the other side to test it out. Then you can write a Ruby program which uses Net::SSH or the corresponding scp / sftp modules to transfer files. You wouldn't actually use putty from your script. (At a push, you might able to script pscp.exe or psftp.exe from Ruby, although you'd have to sort out authentication, either handling interactive prompting for a password, or using public key authentication with no passphrase on the private key) Regards, Brian. -- Posted via http://www.ruby-forum.com/.