LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-07-2004, 07:29 PM   #1
predator.hawk
Member
 
Registered: Aug 2004
Location: USA
Distribution: FreeBSD-5.4-STABLE
Posts: 252

Rep: Reputation: 30
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
 
Old 11-07-2004, 08:30 PM   #2
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
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.
 
Old 11-08-2004, 12:21 AM   #3
predator.hawk
Member
 
Registered: Aug 2004
Location: USA
Distribution: FreeBSD-5.4-STABLE
Posts: 252

Original Poster
Rep: Reputation: 30
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
 
Old 11-08-2004, 09:53 AM   #4
TreeHugger
Member
 
Registered: Jul 2003
Location: London
Distribution: ubuntu, mint, debian
Posts: 112

Rep: Reputation: 15
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?
 
Old 11-08-2004, 10:17 AM   #5
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
You can also try deleting ~/.ssh and try again. There is something wrong with keys I suspect
 
Old 11-08-2004, 02:35 PM   #6
heri0n
Member
 
Registered: Oct 2004
Location: Hamilton, Ontario
Distribution: Slackware 10.0
Posts: 48

Rep: Reputation: 15
or perhaps you have disabled passwords and have no keys?
 
Old 11-08-2004, 03:59 PM   #7
predator.hawk
Member
 
Registered: Aug 2004
Location: USA
Distribution: FreeBSD-5.4-STABLE
Posts: 252

Original Poster
Rep: Reputation: 30
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

Last edited by predator.hawk; 11-08-2004 at 04:02 PM.
 
Old 11-08-2004, 04:08 PM   #8
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
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).
 
Old 11-08-2004, 05:29 PM   #9
predator.hawk
Member
 
Registered: Aug 2004
Location: USA
Distribution: FreeBSD-5.4-STABLE
Posts: 252

Original Poster
Rep: Reputation: 30
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.
 
Old 11-08-2004, 05:43 PM   #10
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

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

egag
 
Old 11-08-2004, 07:39 PM   #11
predator.hawk
Member
 
Registered: Aug 2004
Location: USA
Distribution: FreeBSD-5.4-STABLE
Posts: 252

Original Poster
Rep: Reputation: 30
No same error as before. Anyone got any ideas?
 
Old 11-08-2004, 07:45 PM   #12
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
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.
 
Old 11-08-2004, 09:56 PM   #13
predator.hawk
Member
 
Registered: Aug 2004
Location: USA
Distribution: FreeBSD-5.4-STABLE
Posts: 252

Original Poster
Rep: Reputation: 30
nope, still doesn't work. SSH is gonna get its but booted off my rig if it don't start working.
 
Old 11-09-2004, 07:35 AM   #14
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
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)?

Last edited by Cedrik; 11-09-2004 at 07:37 AM.
 
Old 11-09-2004, 11:17 AM   #15
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot connect to x serverr in ssh YellowFin Linux - Networking 2 03-23-2005 12:29 PM
X connect using ssh suguname Linux - Networking 5 03-06-2005 02:54 AM
ssh will not connect rwalkerphl Linux - Newbie 2 07-26-2004 08:17 AM
how to connect to the same xterm with ssh(?) ?? realos Linux - Networking 5 01-17-2003 09:11 AM
Can't connect via ssh _TK_ Linux - Networking 3 04-27-2001 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration