This is the mail archive of the
mailing list for the Cygwin project.
Re: Cygwin & openssh(d) & login without password
- From: gmiller at cfl dot rr dot com
- To: cygwin at cygwin dot com
- Date: Sun, 10 Oct 2004 09:25:53 -0400
- Subject: Re: Cygwin & openssh(d) & login without password
- Reply-to: gmiller at cfl dot rr dot com
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.
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"
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.
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