0

I would like ask your regarding my script where i am not able to automate login though ssh.

set timeout 30
/usr/bin/ssh -p 8484 root@192.168.210.210
expect 
{
   "root@192.168.210.210s password" 
   {
      send "Passw0rd\r" 
   }
}
Armali
  • 18,255
  • 14
  • 57
  • 171
  • Hello, didn't you forget ":" as in password: ? – Archemar Sep 01 '14 at 12:54
  • possible duplicate of [how to use ssh to run shell script on a remote machine?](http://stackoverflow.com/questions/305035/how-to-use-ssh-to-run-shell-script-on-a-remote-machine) – Kowser Sep 01 '14 at 12:56

1 Answers1

0
  • spawn is missing with your command: spawn /usr/bin/ssh -p 8484 root@192.168.210.210

  • expect doesn't expect the { to be on the next line; write expect { instead.

  • A ' seems to be missing: "root@192.168.210.210's password"

Armali
  • 18,255
  • 14
  • 57
  • 171