PDA

View Full Version : [BASH] Input dopo login SSH


Sn1per
13-03-2015, 17:34
Come posso far eseguire un input dopo essermi connesso via SSH tramite script?
Io ho questo script eseguibile

#!/usr/bin/expect -f
spawn ssh USR@IP
expect "assword:"
send "PASSWORD\r"
interact

ma dopo aver effettuato il login, non mi esegue pił alcun comando. Come posso fare?

OoZic
14-03-2015, 10:01
http://serverfault.com/questions/241588/how-to-automate-ssh-login-with-password

+

http://stackoverflow.com/questions/305035/how-to-use-ssh-to-run-shell-script-on-a-remote-machine