ksh connection to other servers

Hello,

I am looking for a way for a server to launch a connection command to one of the other servers where the connection command has already embedded in it a server name, user name and a password.

Hi, could you make an example of your problem?

Do you mean ssh?

Embedding passwords in shell commands is a bad idea, it's very insecure. For this reason ssh -- and nearly any other login system like su and sudo -- make it extremely difficult to do so. You'd need to install special tools to even make it possible.

Fortunately ssh has a much better, more reliable, and secure way to do noninteractive logins than forcing it to take a noninteractive password: keys. Create your own key and set it up on the remote server with the ssh-copy-id username@host command and you'll be able to login passwordlessly thereafter with ssh username@host. Google "passwordless ssh", the net's littered with hundreds of examples.

1 Like