This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin & openssh(d) & login without password


I wanted to add a little bit to the thread in regards to setup of ssh.  To generate the public and pro\ivate key pairs needed to login with out a password prompt requires the use of the "ssh-keygen" utility.  From your home directory using the following sequence to generate a key pair.

ssh-keygen -t dsa    (the DSA is the key type to be used)
                     (at the prompt file location just accept the file
                      name "$HOME/.ssh/id_dsa" and for a passphrase just 
                      press return, if no passphrase is wanted)


The preceding command will create two files in the ".ssh" directory in your home
directory.  The id_dsa file is your private key and should never be exposed to the
outside world and the id_dsa.pub file is the public key they needs to be on any
system you want to connect to using ssh that you do not want a password prompt.

Copy the public key to the remote system home directory for the user you use on it.

scp .ssh/id_dsa.pub rmuser@rmsystem:     (you will be prompted for a password)

ssh -Y -l rmuser@rmsystem                (you will be prompted for a password)

On that remote system add this public key to the ".ssh/authorized_keys" file.


cd .ssh
foo=`date +%m%d%Y%H%M%S`
echo "Backup current Authorized_Keys to authorized_keys."$foo
cp authorized_keys authorized_keys.$foo
echo "Append pub key to file"
cat ../id_dsa.pub >>authorized_keys
echo "Remove pub file"
rm ../id_dsa.pub
echo "Done"
exit

Now you can test your connection by reissuing the ssh command.  If you entered no
passphrase then you will just be connected to the remote system otherwise you will
be prompted for the passphrase.


I hope this helps.

Gary Miller



Once this is all dome you can test the connect




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]