I generated a private/public key pair using ssh-keygen -t rsa which generated the following output.
nnp@debian:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/nnp/.ssh/id_rsa): Created directory '/home/nnp/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/nnp/.ssh/id_rsa. Your public key has been saved in /home/nnp/.ssh/id_rsa.pub. The key fingerprint is: d5:06:5f:04:e7:7a:4b:8d:25:17:1f:24:e8:45:61:87 nnp@debian nnp@debian:~$ ls .ssh id_rsa id_rsa.pub
As you can see the id_rsa and id_rsa.pub files were created fine. I then created a directory on my other pc called /home/nnp/.ssh/. I ftp'ed the id_rsa.pub file into that and named it authorized_keys. I then tried to run the ssh daemon using
/usr/sbin/sshd -h /home/nnp/.ssh/authorized_keys
but that fails with the following error message.
Could not load host key: /home/nnp/.ssh/authorized_keys Disabling Protocol version 1: Could not find host key Disabling Protocol version 2: Could not find host key sshd: no host keys available -- exiting
Im not entirely sure whats gone on here. The authorized_keys file contains
ssh-rsa AABAB3NzaC1yc2EAAAABIwAAAIEAzhPqnjekHHq/3v6ROPXCQDMOKnqv5Ze2S+H4vkU0JZx6yXU+hUeOitmrLYFZ/MZAtPYZdnf5jQEjqFUXjoftEU18V3e1ydZUfIZABnCNlCdoJJ9TCdpMJSrrUNJQ8Zo7EDAyeCI4Vd+AM JDIwO1Hi0toXb1CcRxxAEZ2z/0tYBE= nnp@debian
(well it contains something that looks similar to that ;))
there are no spaces in the key though. The forum put them in
I thought maybe the ssh-rsa bit at the start had to be removed when its put into the authorized_hosts file but i get the same message anyway. ANy ideas?
Thanks,
NNP

Sign In
Register
Help
MultiQuote