Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^6: Net::SSH::Expect login using SSH keys

by ashok.g (Beadle)
on Dec 07, 2010 at 14:56 UTC ( [id://875816]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Net::SSH::Expect login using SSH keys
in thread Net::SSH::Expect login using SSH keys

I added the host to known_hosts. Now, I'm able to get the SSH reference. But, no command is executing via $ssh.
$ssh->send("ls");
Here it is again asking for password. Why?

Replies are listed 'Best First'.
Re^7: Net::SSH::Expect login using SSH keys
by salva (Canon) on Dec 07, 2010 at 16:34 UTC
    Something is wrong with your ssh configuration.

    Try login as the apache user on the local machine and connecting to the remote host from the command line.

    # su - apache $ ssh -l user 192.168.1.181

    Once you get that to work, you should be able to connect from your script using Net::SSH::Expect!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://875816]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-28 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found