Topic: Issue with Net::SSH
I am trying to play around with SSH using which I am using to automate my process.. Dont curse me if this is quite straight forward, am quite a noob here
The idea is that I need to connect to a remote server and from there connect to the various machines and execute my commands there. I am able to login to the remove server successfully but moving from there to other machines is an issue..
For eg. I connect to remote server which which is a jumpstation.. From this I can move to other machines to execute my code there.. This works correctly using SSH Client with Bash commands
Below is the code
password = "xyz"
puts "Inside Login"
Net::SSH.start('host', 'username', :password => password) do |ssh|
# capture all stderr and stdout output from a remote process
output = ssh.exec!("host")
puts "Connection Established"
ssh = Login(password)
puts ssh.exec!("ssh user@otherhost")
This prints "ssh: shell login on secondary not allowed in batch mode". Can anybody kindly guide me as how should have a go at this.
Thanks for the Help