SSH and then SSH again
Abid K <[email protected]> Fri, 11 Dec 2009 10:26:48 +0000
| Newsgroups | gmane.comp.java.sshtools.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I am hoping someone here could help me with my query. I am looking to SSH into a server and then from that server I want to SSH into another server, so I can open a SFTP connection to transfer a file down from the two servers to my local computer. I have taken a look at the source code and Javadoc, but I am unable to work out if it is possible. Currently, I have successfully created a SSH connection to the first server and I am able to ssh to the second server using the shell, but I am looking to do this programatically to avoid manual work. I am thinking... 1. Create SSH connection to server 1 - Done 2. Create SSH on server 1 to server 2 - ? 3. Open SFTP connection on server 2 - ? 4. Get file from server 2 to server 1 - ? 5. Open SFTP connection on server 1 - Done 6. Get file from server 1 to local computer - Done Is this possible? Thank you ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev