pinpe
August 17, 2011, 7:10am
1
Hi Guys!
I am trying to write a shell script for automated ssh. vairable user and passwd have initialized correctly, but when I use the following it still prompting me for the password.
#!/usr/bin/bash
user='root@10.14.76.225'
passwd='admin'
ssh $user
$passwd
uptime
exit
I have also tried the following
ssh $user < $passwd
uptime
exit
EOF
and no luck. Please help. Thanks in advance.
Br,
pinpe
google it "password less ssh"
Best way to automate ssh connection is making trusted relantionships between the machines. Search google for authorized_keys
pludi
August 17, 2011, 7:54am
4
Hello!
Per forum rules, and the benefit of all users, please search the forums before posting a question.
You can easily search the forums using our internal Google search engine or our advanced internal search engine . You can also search our huge UNIX and Linux database by user generated tags or search the database for unanswered questions and provide an answer.
Thank you.
The UNIX and Linux Forums