Freshly installed Debian 4.0 only accepting ssh connection from PuTTY.
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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
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.
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...
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?
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)?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.