LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-20-2007, 05:13 AM   #1
Zombie13
Member
 
Registered: Nov 2003
Posts: 70

Rep: Reputation: 15
Freshly installed Debian 4.0 only accepting ssh connection from PuTTY.


I've installed Debian 4.0 onto my Sun Ultra5, choosing the Desktop Environment, Web Server, and File Server configuration. After this, I installed ssh by doing "apt-get install ssh".

My Windows XP machine can connect to it fine using PuTTY, but using ssh from a command line in Fedora Core on the same machine results in "Connection closed". I've also tried this from my Mandriva machine, and I'm still getting the same. I'm guessing it's something to do with either the protocols or the keys.

Can anyone give me a few suggestions?

Cheers,
Zomb.
 
Old 07-20-2007, 06:07 AM   #2
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
Is there any type of error message besides "Connection closed"?
Try connecting with 'ssh -v' (up to three '-v' for more verbosity). Maybe that'll shed some light on it.
 
Old 07-20-2007, 06:09 AM   #3
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
I've never had any problems like that with the default Debian settings. Until I change all the ports, I can use ssh from any other machine as normal. Is it possible your problem has something to do with a router? Either way, you can check your basic settings at /etc/ssh/sshd_config. If you made settings of your own, the config file will be in your /home/you/.ssh/ directory.
 
Old 07-20-2007, 08:12 AM   #4
Zombie13
Member
 
Registered: Nov 2003
Posts: 70

Original Poster
Rep: Reputation: 15
Thanks for the replies, peeps. My Windows XP and Fedora Core 6 installation are on the same PC, with the same IP etc. PuTTY under Windows works (using ssh 2 protocol), but ssh from a command line in Fedora doesn't. I've also tried "ssh -2 sun-z13" from the Fedora command line.

I've tried "ssh -v sun-z13" as suggested...
Quote:
OpenSSH_4.3p1, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to sun-z13 [192.168.0.6] port 22.
debug1: Connection established.
debug1: identity file /home/rich/.ssh/identity type -1
debug1: identity file /home/rich/.ssh/id_rsa type -1
debug1: identity file /home/rich/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2 Debian-9
debug1: match: OpenSSH_4.3p2 Debian-9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'sun-z13' is known and matches the RSA host key.
debug1: Found key in /home/rich/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
Connection closed by 192.168.0.6
I know this has gotta be something simple.

Last edited by Zombie13; 07-20-2007 at 08:13 AM.
 
Old 07-20-2007, 10:39 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Anything in /var/log/auth.log?
 
Old 07-20-2007, 10:48 AM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Why are you all suspecting something wrong with the Debian ssh server? If PuTTY can connect to it, then obviously it's working. The ssh CLIENT settings in Fedora Core and Mandriva are the obvious suspects.

My guess is that both FC and Mandriva have the ssh client configured for key based instead of password based authentication. By default, Debian's openssh-server installs with password based authentication.
 
Old 07-21-2007, 09:15 AM   #7
Zombie13
Member
 
Registered: Nov 2003
Posts: 70

Original Poster
Rep: Reputation: 15
Cheers, IsaacKuo. That's what I was thinking (client problem), but isn't key based authentication for when you don't want to use a password to log in? I don't want that, I just want to be able to ssh into the box just like I do to my Mandriva and Fedora boxes.

I can't believe this is a problem, such a fundamentally simple task...

Cheers,
Zomb.

Last edited by Zombie13; 07-21-2007 at 09:18 AM.
 
Old 07-22-2007, 07:01 AM   #8
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Quote:
Originally Posted by Zombie13
but isn't key based authentication for when you don't want to use a password to log in?
Key based authentication can work either way: with a password or without. Although a lot of people do it without a pass because it's quicker, I prefer to have a password for the key since it's more secure.

Have you checked the default client settings on your other distros?
 
Old 07-22-2007, 07:34 AM   #9
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
You said XP and FC share the same IP? That might be the source of the problem. Check the sshd log details.
 
Old 07-23-2007, 11:30 AM   #10
Zombie13
Member
 
Registered: Nov 2003
Posts: 70

Original Poster
Rep: Reputation: 15
Thanks for the reply, but I don't understand how having one of my machines dual-booted with XP and FC could be the problem. Using PuTTY under Windows on that machine works fine, but using ssh on the FC command line on the same machine results in "Connection closed". Doesn't that prove that it's a configuration problem on either the ssh server on the Debian box, or the ssh client on FC (and also on my Mandriva box)?

Cheers,
Zomb.
 
Old 07-23-2007, 12:54 PM   #11
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Is there anything at the time of the connection attempt(s) in /var/log/auth.log on the Debian server?
 
Old 07-23-2007, 01:08 PM   #12
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
Quote:
Originally Posted by Zombie13
Thanks for the reply, but I don't understand how having one of my machines dual-booted with XP and FC could be the problem.
Depending on how you connect, the first time an IP address is seen by a sshd it keeps some information. When this information doesn't match later on, it thinks it's some kind of attack.

Just change the IP address of your Fedora installation to an IP address you haven't used to connect to sshd and try again.
 
Old 07-23-2007, 02:16 PM   #13
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
I'd start by deleting the ~/.ssh/known_hosts file on the Fedora box.
 
  


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
SSH connection from Linux to Windows using PuTTy legendaryhwk Linux - Security 2 04-05-2006 06:34 PM
Putty and ssh connection hangs KidKootenay Linux - Newbie 7 09-03-2004 11:30 PM
putty SSH connection deWin Linux - Newbie 3 03-26-2004 09:47 AM
my PuTTY connection over ssh is too slow. chris.pickett Linux - Networking 2 11-22-2003 02:57 AM
Connection from Win98 to RH9 through putty (SSH) mikeshn Linux - Networking 14 07-13-2003 01:03 AM

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

All times are GMT -5. The time now is 05:04 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