Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ssh redirection

Status
Not open for further replies.

ddanj

IS-IT--Management
Jul 19, 2005
9
0
0
US
So i'm trying to automate input for SSH. I know I could do it with expect, or by havint authrized_key on all the machines, but I want to do it in another way if possible.

I'm trying to basicly do this:

ssh root\@$machine > file

but i'm getting this error:

'Pseudo-terminal will not be because stdin is not a terminal'

I think this means, that ssh only accepts input from a 'terminal'

is there any way around this?

thank you

-ddanj
 
wheres the edit button?

'Pseudo-terminal will not be because stdin is not a terminal'
should be

'Pseudo-terminal will not be <b>allocated</b> because stdin is not a terminal'
 
It's a security feature. If you're calling it from your own scripts then you could be storing key passwords in clear text which is undesireable. If you want totally automated operation, I'd use a host key without a password. ssh will let you do this as it can check the security of the file containing the key (I think;-).

If you really want the interactive ssh, then something that creates a pseudo terminal is necessary and expect is your best bet.

Yours,

f

&quot;As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.&quot;
--Maurice Wilkes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top