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 |
Try to get some debugging information by using the -v switch [-v/-vv/-vvv] issuing slogin.
Code:
slogin -v hostname |
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 |
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? |
You can also try deleting ~/.ssh and try again. There is something wrong with keys I suspect :)
|
or perhaps you have disabled passwords and have no keys?
|
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 |
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).
|
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.
|
maybe try : " ssh -l root localhost "
if all is well it asks for the root-password to login as root. egag |
No same error as before. Anyone got any ideas?
|
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.
|
nope, still doesn't work. SSH is gonna get its but booted off my rig if it don't start working.
|
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)? |
Strange, it works here (Slackware 10.0) :
Code:
OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004 |
All times are GMT -5. The time now is 06:40 PM. |