Quote:
Originally Posted by
Nicol
well thank you to worry about my password.
It won't be visible because i will type it as the script begin to run.
This script will connect more than 100 machines and i don't want to type it each time a ssh command will run.
This is a very important script for me and i'm sure there's a solution to enter the password with the "ssh -t"
Christian
Hi Nicol,
There is no parameter for you to input password to ssh command. There is only way to using ssh command without password, It's using public key authentication.
Please make sure that OpenSSH was installed on your system, follow below steps:
1. On the client run the following commands:
Quote:
$ mkdir -p $HOME/.ssh
$ chmod 0700 $HOME/.ssh
$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''
This should result in two files, $HOME/.ssh/id_dsa (private key) and $HOME/.ssh/id_dsa.pub (public key). Copy $HOME/.ssh/id_dsa.pub to the server.
2. On the server run the following commands:
Quote:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
$ chmod 0600 $HOME/.ssh/authorized_keys2
Depending on the version of OpenSSH the following commands may also be required:
Quote:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys
$ chmod 0600 $HOME/.ssh/authorized_keys
An alternative is to create a link from authorized_keys2 to authorized_keys:
Quote:
$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys
3. On the client test the results by ssh'ing to the server:
Quote:
Quote:
$ ssh -i $HOME/.ssh/id_dsa server
Good luck to you !