LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   SSH Won't allow me to connect (https://www.linuxquestions.org/questions/slackware-14/ssh-wont-allow-me-to-connect-252223/)

predator.hawk 11-07-2004 07:29 PM

SSH Won't allow me to connect
 
I wanted to test out SSH, so started rc.sshd and it generated my keys and such. Now, every time i try and use ssh localhost i get this error

ssh_exchange_identification: Connection closed by remote host

rotvogel 11-07-2004 08:30 PM

Try to get some debugging information by using the -v switch [-v/-vv/-vvv] issuing slogin.
Code:

slogin -v hostname
The more v's the more information slogin will give. Most of the times you might get a clue what's going wrong.

predator.hawk 11-08-2004 12:21 AM

Heres your debug info.

OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to predatorbox [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/predator/.ssh/identity type -1
debug1: identity file /home/predator/.ssh/id_rsa type -1
debug1: identity file /home/predator/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host

TreeHugger 11-08-2004 09:53 AM

Looks like it's failing to identify you according to the config you have set up. I think its demanding public keys, but not getting any. What files do you have in your /home/predator directroy?

What's in your /etc/ssh/ssh_config settings?

rotvogel 11-08-2004 10:17 AM

You can also try deleting ~/.ssh and try again. There is something wrong with keys I suspect :)

heri0n 11-08-2004 02:35 PM

or perhaps you have disabled passwords and have no keys?

predator.hawk 11-08-2004 03:59 PM

Looks like i'm missing my ssh keys, i just created my ~/.ssh/id_rsa and id_dsa keys, but how do i make my identity file?

Edit: Last night i also installed OpenSSH 3.9p1 (from slackware current) heres the output from a slogin -vv command

OpenSSH_3.9p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to predatorbox [127.0.0.1] port 22.
debug1: Connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/predator/.ssh/id_rsa type 1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/predator/.ssh/id_dsa type 2
ssh_exchange_identification: Connection closed by remote host

rotvogel 11-08-2004 04:08 PM

Your identity files are your keys, no need to create anything. But did you generate a new key pair after logging in on a remote machine earlier ? You could delete the ~/.ssh/known_hosts file on the remote machine, see what happens then (it will be recreated automaticly).

predator.hawk 11-08-2004 05:29 PM

I'm not trying any of this remotely, i'm just trying to get into my box localy via ssh. so far it hasn't worked.

egag 11-08-2004 05:43 PM

maybe try : " ssh -l root localhost "
if all is well it asks for the root-password to login as root.

egag

predator.hawk 11-08-2004 07:39 PM

No same error as before. Anyone got any ideas?

rotvogel 11-08-2004 07:45 PM

You could remove the openssh package, delete all config files and keys, delete the .ssh in home directories and try reinstalling it. It should work out of the box. At least it does here.

predator.hawk 11-08-2004 09:56 PM

nope, still doesn't work. SSH is gonna get its but booted off my rig if it don't start working.

Cedrik 11-09-2004 07:35 AM

On my system, I got the same errors as you with slogin -vv, although ssh work fine here.

Your connection failure must be due to another thing.

OpenSSH_3.9p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/cedrik/.ssh/identity type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/cedrik/.ssh/id_rsa type 1
debug1: identity file /home/cedrik/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
...
...
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)?

rotvogel 11-09-2004 11:17 AM

Strange, it works here (Slackware 10.0) :
Code:

OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /root/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.8.1p1
debug1: match: OpenSSH_3.8.1p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1

Same result as logging in unpriviliged user


All times are GMT -5. The time now is 06:40 PM.