Click to See Complete Forum and Search --> : Automating SSH and jumping through hoops


disrael
12-03-2003, 05:25 PM
Okay I am working on a project. Here is what I need to do. I need to ssh into a computer which only has access to some other servers, from that "middle man" server I need to grab log files using sftp or scp from servers behind the "middle man". In addition, we have 3 middle men, all mirrored, with mirrored servers behind them. I run into the problem with passwords, my workstation has openssh, the servers are using ssh2. I can get it to not prompt a password, if i do not use passphrase, but due to security I must use one. Tomorrow, I am going to try to get someone to work with the servers that has implimented SSH2 and see about going that route, until then does anyone have any recommendations or sites they could refer me to, since most of the sites i've seen like to set the passphrase to NULL. In addition intergrating SSH2 and openssh is seeming to give me a headake. BTW this is going to be written into a script, I know perl, I can do shell.

This seems like I am tyring to make a bubble inside of a bubble.

Thanks for your help,
Doron

oakleys
12-03-2003, 06:01 PM
Just a thought--have you considered port forwarding?

bwkaz
12-03-2003, 07:50 PM
ssh-agent does what you want. You give it your private key's passphrase once, and it keeps track of it while you're using ssh across each foreign host. You have to do something with SSH port forwarding to be able to talk to the local instance of ssh-agent from the remote machines, but that shouldn't be too bad.

What I don't know is exactly how ssh-agent works. You might start with its manpage, though. :)