Forums: Problem Setting Up Ssh - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem Setting Up Ssh

#1 User is offline   n.n.p 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 118
  • Joined: 20-June 05

Posted 28 August 2005 - 10:49 AM

Hey guys. Im currently trying to set up an ssh daemon on my second pc (just for laughs really :P ) but i've run into a problem

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
0

#2 User is offline   DumpZ 

  • Sergeant First Class
  • Icon
  • Group: Members
  • Posts: 356
  • Joined: 04-December 03

Posted 28 August 2005 - 02:42 PM

nnp@debian


i assume by that, that you are using debian.

so why dont you just do

apt-get install ssh
apt-get install sshd
apt-get install openssg

one of the above i forgot which one was the correct one :)
0

#3 User is offline   fulvioo 

  • Staff Sergeant
  • Icon
  • Group: Specialist
  • Posts: 251
  • Joined: 27-March 04

Posted 28 August 2005 - 03:41 PM

No, you got it wrong.
You use the '-h' to the host (server) key.. this is not related to the users key. You only need/want that to specify the option by command line
Just start the sshd deamon. It will read the options in sshd_config file
0

#4 User is offline   buzzons 

  • i wish i was admin
  • Icon
  • Group: Second Lieutenant
  • Posts: 1,817
  • Joined: 25-August 03

Posted 28 August 2005 - 04:10 PM

really the ans is simple

check this line:

Your identification has been saved in /home/nnp/.ssh/id_rsa.

then this one

Could not load host key: /home/nnp/.ssh/authorized_keys

are they looking in the same place? no. they are not.


at this line :

Enter file in which to save the key (/home/nnp/.ssh/id_rsa):

enter : /home/nnp/.ssh/authorized_keys

should work
0

#5 User is offline   Pro21 

  • Sergeant
  • Icon
  • Group: Members
  • Posts: 230
  • Joined: 12-February 04

Posted 01 September 2005 - 03:09 AM

on debian depend on the version :)
apt-get install ssh
aptitude install ssh
and i think that s all :) No more No less :D
0

#6 User is offline   fulvioo 

  • Staff Sergeant
  • Icon
  • Group: Specialist
  • Posts: 251
  • Joined: 27-March 04

Posted 01 September 2005 - 08:31 AM

DumpZ and Pro21:
I dont know if you noticed, but he already have ssh installed O.o

buzzons:
If you look closer, he said he already renamed the file

n.n.p:
What I said did any sense to you? Did it work?
0

#7 User is offline   Pro21 

  • Sergeant
  • Icon
  • Group: Members
  • Posts: 230
  • Joined: 12-February 04

Posted 02 September 2005 - 08:39 AM

he seems to have a problem that s the reason why lol
I never had a problem to install a ssh server maybe im a lucky boy :)
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

  • Share



Our Sponsors:


SwiftLayer Affiliate Web Hosting