Net::SSH to login into a server with a public key



Hi,
I have a remote server B which can only accessed via server A through a
public key.

Is there a way to do this in net/ssh ?

I have started an SSH session for A

Net::SSH.start("ServerA","username",:password=>"xyz") do |ssh|
#is there a way to now login into B?
#In putty I just do: ssh B and I am in
end

thanks.
--
Posted via http://www.ruby-forum.com/.

.



Relevant Pages

  • ssh.exe hangs in windows if session doesnt connect properly
    ... I am working with an application that will start an ssh session to connect to ... a remote server, perform a task, and then terminate the ssh session. ... Is there a way to remove the hung process using a command in the cmd window? ... I can see that there is a pid associated with the process in task manager -- ...
    (microsoft.public.windows.server.networking)
  • Re: Can not login to remote SSH server using ssh2_auth_pubkey_file
    ... remote PC, so username/password is not an option for me ... Have the public key installed on the remote server in the user's ... remote server or the private key being encrypted. ...
    (comp.lang.php)
  • Re: Linux: ssh keys
    ... create a key pair with ssh-keygen. ... Store the public key on the ... remote server, in ~/.ssh/authorized_keys of the user account. ...
    (comp.security.ssh)
  • Re: ssh passwordless login
    ... I did share the public key to the remote server ... failing to setup. ... open putty and login ...
    (RedHat)
  • Re: ot: open source backup program?
    ... fiddling about on the remote server with your generated public key. ... then maybe some kind of ftp backup might do it. ...
    (uk.rec.motorcycles)