Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ssh from script

 
Satish Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am writing a simple script to ssh to a another machine and execute some command

#!/usr/bin/ksh

ssh -l <hostip> << EOF
password
ls
EOF

but when I execute the script I am getting the following message

"Pseudo-terminal will not be allocated because stdin is not a terminal." an d I am asked to enter the password on the prompt..

Any idea how this could be resovled.

Thanks
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My manpage tells me lot of possibilities to handle login via /etc/hosts.equiv, ~/.shosts, /etc/ssh/... or other config-files.

(none of them seems to work for me )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic