Operating System - Linux
1830234 Members
2383 Online
109999 Solutions
New Discussion

Linux 7.2 connection refused

 
Carlos Munoz Lopez
Frequent Advisor

Linux 7.2 connection refused

Hi guys! I'm having problems with remote connection using telnet and ssh. When I try to use telnet to connect to my server running Linux RedHat 7.2 it display all the normal information (connection established to xx.xx.xx.xx) but when I enter the username (for instance root) and the password it says Login incorrect, even when the password is correct. Another problem is with ssh, when I try to connect to the server it displays the following message:

OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to 10.20.30.40 [10.20.3.40] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_2.9p2
debug1: match: OpenSSH_2.9p2 pat OpenSSH_2.*,OpenSSH_3.0*,OpenSSH_3.1*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.5p1
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 sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 128/256
debug1: bits set: 1057/2049
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
e5:8f:e6:1d:d3:95:25:d7:91:af:0a:1b:b5:58:ed:7f.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:3
RSA host key for 10.20.30.40 has changed and you have requested strict checking.
Host key verification failed.
debug1: Calling cleanup 0x80674d0(0x0)

What do I have to change in order to connect to the server??

And one last problem is with the ftp, how can I configure an ftp server, specially a secure one, using sftp??? I would like some help on theses issues.
6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor

Re: Linux 7.2 connection refused

1. Make sure your linux system is allowing you to login directly as root.

2. Edit /root/.ssh/known_hosts on the local server and remove the line that has the Linux system's IP and try ssh.

3. Try with a different user and see if it is allowing.

Usually ssh packages are supplied with sftp-server. If you have it, then you can use it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Linux 7.2 connection refused

I see a version mismatch in your logs.

Some entries are for openssh 3.5, others for openssh 3.0

I further know that openssh 3.1 came with Red Hat 7.3.

I'd say you are the victim of a failed upgrade to openssh 3.5

Probably you need to back out the upgrade and reinstall it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Carlos Munoz Lopez
Frequent Advisor

Re: Linux 7.2 connection refused

It's strange because it wasn't an upgrade, it wasn't previously installed, the system marked as a clean installation.

I tried your suggestion with the /root/.ssh/known_hosts, but it didn't work. Do I have to change something in the /etc/ssh/ssh_conf??
Sridhar Bhaskarla
Honored Contributor

Re: Linux 7.2 connection refused

I am not sure if it is due to version mismatch.

What error are you getting now after removing the host key from known_hosts?. It's the third line. Or move known_hosts as known_hosts.old and try.

It shoudl prompt you login. If you are not able to login even then, I believe Linux is not allowing direct login for root. Look at the syslog on the Linux box for any error information.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Linux 7.2 connection refused

a rebuild of .ssh/known_hosts seems the next logical step.

What I saw may merely be unmodified pieces of the software untouched by upgrades.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Carlos Munoz Lopez
Frequent Advisor

Re: Linux 7.2 connection refused

I tried to comment some lines in the /etc/ssh/sshd_config file, and it worked, the lines commented were:

Port 22
ListenAddress 0.0.0.0
HostKey /etc/ssh/ssh_host_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
ServerKeyBit 768

I tried the connection from another Linux server and it was successful, but when I tried it from my PC using a terminal emulator it didn't work. I don't know what is going on?