{ 5 comments… read them below or add one }

1 Sriram September 7, 2006

When I try to Authenticate via SSH using a Script , I get

The script is the same :

Pseudo-terminal will not be allocated because stdin
is not a terminal.

I tried using -t and -T switch both on and off.

Suggest if you have any better Ideas

Many Thanks
Sriram

Reply

2 Anonymous June 16, 2011

You can try replacing ” ssh $USR@$host w > $OUT” with ” ssh -t -t -l $USR $host w > $OUT”

Reply

3 krishna kumar March 28, 2007

i want to know whether i can login to a sever using SSH by hardcoding the user name and password in my unix script.

expecting your replay soon.

Reply

4 Nilesh August 21, 2007

Yes, you can login to server using SSH by hardcoding
. For this you have to use php.
Php provides expect module to ssh login.

Reply

5 ccb March 28, 2009

@ krishna kumar
@ Nilesh

PHP isn’t necessary — you can generate public/private keys per user/host you wish to connect to and avoid passwords altogether, allowing you to fully automate your ssh connections.

Google ‘ssh without password’ and you’ll find plenty of tutorials on this process.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 5 + 5 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: