• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ssh from script

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 )
 
reply
    Bookmark Topic Watch Topic
  • New Topic