Hi all Probably this question was asked before, but I didn't find anything in the FAQ or in the archives. I've written an programm that connects to a SSH server and communicate over the SSH protocol with a SSH subsystem. SSH now shows a prompt where the password should be typed in. If an error occurs (protocol error or so) the programm must reconnect to the server and reestablish the connection. If I fork the SSH program again, it will require the password to be typed into the console again. But as daemon there is no shell and it will fail. So, is there a possiblilty to pass the password e.g by using stdin or any other method which is secure? Norbert
mouring at etoh.eviladmin.org
2002-Jan-09 15:11 UTC
Passing a password from a program to ssh
On Wed, 9 Jan 2002, Norbert Sendetzky wrote:> Hi all > > Probably this question was asked before, but I didn't find anything > in the FAQ or in the archives. > > I've written an programm that connects to a SSH server and > communicate over the SSH protocol with a SSH subsystem. SSH now shows > a prompt where the password should be typed in. If an error occurs > (protocol error or so) the programm must reconnect to the server and > reestablish the connection. If I fork the SSH program again, it will > require the password to be typed into the console again. But as > daemon there is no shell and it will fail. > > So, is there a possiblilty to pass the password e.g by using stdin or > any other method which is secure? >Why not use ssh-keygen and use that so you don't have to worry about entering passwords? - Ben