PDA

View Full Version : SSH connection problem


gral
5th November 2007, 20:46
Hello, recently i've had troubles connecting via SSH to of my servers, the error output is very weird,

[root@server1 ~]# ssh server2.name.com
Rejected
Connection to server2.name.com closed.

I can connect server1 to others of my servers and can't to others ones and i receive the same error, there are not wrappers on them, the ping is great between them, and i cant do a scp o sftp neither, however i can successfully telnet the port 22 of the target host;

[root@server1 tmp]# telnet server2 22
Trying xx.xx.xx.xx....
Connected to stats.bippie.com (xx.xx.xx.xx).
Escape character is '^]'.
SSH-1.99-OpenSSH_3.6.1p2


The sshd_config is for default there are not configs on it.

Any clue will be very very helpfully , and sorry for the continous problems :(

Best Regards!

falko
6th November 2007, 23:06
Do you use something like DenyHosts or fail2ban? Maybe your server got blocked on the other system.

technick
7th November 2007, 22:24
This sounds more to me like hosts.deny problem really. Fail2ban adds the offending IP address to iptables and drops all communication to that ip, never giving a straight out rejection.

lwh.dk
10th November 2007, 15:52
Hi

when you not is giving the username that you what to connect with in the command: [root@server1 ~]# ssh server2.name.com
ssh normaly tries with the username that you currently is using on the host you are connection from and that would be root.
Some Linux OS sshd configuration dont allow root to login by default.
try look for
PermitRootLogin no

in your sshd_config ?

gral
10th November 2007, 18:02
Thanxs everybody for yours replys the problem was solved and was a automatic script execution when somenone login via ssh the server2 from server1.

Regards!