ssh without password

David david at kenpro.com.au
Sat Oct 15 02:05:53 UTC 2005


On Fri, Oct 14, 2005 at 04:40:19PM +0200, Pascal Hos wrote:
> David,
> 
> Check the following page:
> http://www.csua.berkeley.edu/~ranga/notes/ssh_nopass.html
> 
> This should solve your problem.

My thanks to all who answered... 

I was already reading this excellent page.. but the moral of the story is 
"don't do things at 2am when you are half asleep". I had misread the 
instructions and placed the public key in a directory called authorized_keys 
instead of renaming it as authorized_keys

david at bar:~/.ssh/authorized_keys/id_dsa.pub
                ^^^^^wrong!^^^^^

david at bar:~/.ssh/authorized_keys
                 ^^^^correct^^^^

silly me :(

> 
> Pascal
> 
> On 10/14/05, David <david at kenpro.com.au> wrote:
> >
> > I'm trying to use dsa key pairs so that I can ssh in a cron script without
> > passwords. I've generated the key pair, then copied the public key to the
> > server. Client is Hoary, and server is Debian Sarge.
> >
> > When I ssh, I get asked for a password. Is there some step I'm missing? Is
> > there something in the sshd_config or ssh_config that needs fixing?
> >
> > Another point: since sudo is not an option in this case, does that mean I
> > have to activate root?
> >
> > While I'm asking.. can anyone tell me if there is any advantage of either
> > RSA
> > or DSA?
> >
> > Below is what I actually did.
> >
> > thanks... David.
> >
> > david at foo:~/.ssh $ ssh-keygen -t dsa
> > Generating public/private dsa key pair.
> > Enter file in which to save the key (/home/david/.ssh/id_dsa):
> > Enter passphrase (empty for no passphrase):
> > Enter same passphrase again:
> > Your identification has been saved in /home/david/.ssh/id_dsa.
> > Your public key has been saved in /home/david/.ssh/id_dsa.pub.
> > The key fingerprint is:
> > david at foo:~/.ssh $ ls
> > authorized_keys authorized_keys2 id_dsa id_dsa.pub known_hosts
> >
> > david at foo:~/.ssh $ scp id_dsa.pub david at testbar
> > :/home/david/.ssh/authorized_keys
> > Password:
> > id_dsa.pub 100% 600 0.6KB/s 00:00
> > david at foo:~/.ssh $ ssh david at fast
> > Password:
> >
> > DARN! Why does it ask for a password!
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >

> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users





More information about the ubuntu-users mailing list