File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes ssh from script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "ssh from script" Watch "ssh from script" New topic

ssh from script

Satish Kulkarni
Ranch Hand

Joined: Jul 19, 2003
Posts: 60
I am writing a simple script to ssh to a another machine and execute some command


ssh -l <hostip> << 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.

Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

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 )
I agree. Here's the link:
subject: ssh from script
jQuery in Action, 3rd edition