Currently i'm doing an ssh connection in my code like this:
Net::SSH.start( @HOST, @USER, :password => @PASS ) do|ssh|
@result = ssh.exec!("ls")
end
Now I need to do an SSH connection without giving any password. I was not able to find the exact format to start ssh connection without giving any password.
I have added the SSH keys in authorized key list of the HOST. I remember seeing the below code somewhere on the net when i browsed for ssh without password.
Net::SSH.start( @HOST, @USER) do|ssh|
@result = ssh.exec!("ls")
end
Please correct me if iam wrong