Quantcast
Channel: Active questions tagged expect - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 157

Shell Script for logging into a ssh server

$
0
0

I tried writing a shell script which can do automatic login into a ssh server using password which is mentioned in the script. I have written the following code:

set timeout 30/usr/bin/ssh -p 8484 root@172.31.72.103expect {"root@172.31.72.103's password"   {      send "password\r"   }}

This code is not running properly, still it is asking for the password. Can somebody please help me in solving this


Viewing all articles
Browse latest Browse all 157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>