osx - SSH host < script.sh - not work with expect -


i have script:

expect -c "spawn ssh $sshusername@$iptestlion; expect \"*?asswor?:*\" {send \"$sshuserpasswort\\r\"; interact};" < $path2script/sshevents.sh 

this doesn't work. know why?

try add expect before interact:

expect -c "spawn ssh $sshusername@$iptestlion; expect \"*?asswor?:*\" {send \"$sshuserpasswort\\r\"; expect \"*:~*\" {interact;};};" < $path2script/sshevents.sh 

also make sure have permission create file in /users/admin/test/ , directory exists.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -