ssh, sftp, and public key authentication
Erik Norgaard
norgaard at locolomo.org
Fri Feb 18 19:48:29 GMT 2005
dave wrote:
> Hello,
> I've got a machine i use public keys on to which i'm trying to ssh. When
> i created a key for this user i did not define a passphrase, yet i am being
> asked for one when i ssh in to the box. I use the command ssh -i
> <filename.pub> hostname however if i do sftp username at hostname i'm allowed
> in no questions asked.
> Help needed!
This is typically a problem with the key not being exported properly. By
default ssh falls back to normal password authentication. You can
configure ssh only to allow keys for extra security.
You need to export the key to the destination host like this:
$ scp .ssh/<filename.pub> username at hostname:
$ ssh hostname
$ cat <filename.pub> >> .ssh/authorized_keys
Now since username does not have access to hostname yet, you can mail or
send by other means the public key - it's public, not secret - and have
the admin do
# cat <filename.pub> >> ~username/.ssh/authorized_keys
Some errors I have seen is spelling authorized_keys in british english.
--
Ph: +34.666334818 web: http://www.locolomo.org
S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt
Subject ID: A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9
Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2
More information about the freebsd-questions
mailing list