Passwordless login with ssh

Steven E. Harris seharris@raytheon.com
Thu Oct 16 17:46:00 GMT 2003


Andrew DeFaria <Andrew@DeFaria.com> writes:

> Now for ssh-user-config:
>
> $ ssh-user-config
> Shall I create an SSH1 RSA identity file for you? (yes/no) yes
> Generating /us/adefaria/.ssh/identity
> Enter passphrase (empty for no passphrase):
> Enter same passphrase again:
> Do you want to use this identity to login to this machine? (yes/no) yes
> Adding to /us/adefaria/.ssh/authorized_keys

[...]

Now both your public and private keys are in your "adefaria" home
directory, and your public key is noted as authorized for login to
whatever host you're running on here.

> $ ssh adefaria id
> adefaria@adefaria's password:
> uid=1370(adefaria) gid=513(Domain Users)
> groups=1834(clearcase),512(Domain Admins),513(Domain
> Users),2637(Employees-US-Security),1170(Everybody),1331(Software),1866(Software-US-Security)
>
> As you can see ssh-user-config did not change the need to enter my
> password for ssh.

On what host are you running the ssh client here? Is your home
directory still the same "adefaria" on this host? It's not clear from
your example which hosts are involved, and I suspect the problem is
that your public and private keys are sitting in the right place on
the server, but you don't have your keys available on the client
host.

Usually key generation and adding a new public key to the
authorized_keys file don't take place on the same host. With Debian's
ssh package¹, there's a script called ssh-copy-id² that adds a local
key to a remote host's authorized_keys file. I was surprised to find
that the Cygwin ssh-user-config script didn't offer to do the remote
addition, as adding the key to the local host's authorized_keys file
will only help if you move the key pair elsewhere, or have access to
the same home directory from multiple hosts.


Footnotes: 
¹ http://packages.debian.org/stable/net/ssh.html
² http://www.eviladmin.org/cvs/cvsweb.cgi/contrib/ssh-copy-id

-- 
Steven E. Harris        :: seharris@raytheon.com
Raytheon                :: http://www.raytheon.com

--
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/



More information about the Cygwin mailing list