Date: Fri, 18 Feb 2005 20:48:19 +0100 From: Erik Norgaard <norgaard@locolomo.org> To: dave <dmehler26@woh.rr.com> Cc: freebsd-questions@freebsd.org Subject: Re: ssh, sftp, and public key authentication Message-ID: <42164683.8030807@locolomo.org> In-Reply-To: <006d01c515c3$92ed5300$fb7cb941@satellite> References: <006d01c515c3$92ed5300$fb7cb941@satellite>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42164683.8030807>