Re: ssh connection refused (296 Views)
Reply
Regular Advisor
John McDen
Posts: 172
Registered: ‎02-20-2002
Message 1 of 11 (296 Views)
Accepted Solution

ssh connection refused

I installed ssh 3.1 on 3 server exactly the same procedure for all.

But I am not able to use ssh to connect to only one of the servers it does not give any error.

I use ssh -l username hostname it prompts me to enter the passwd and then It only says connection refused and comes out.

Any ideas ??
New to HP
Honored Contributor
Clemens van Everdingen
Posts: 1,035
Registered: ‎09-13-1999
Message 2 of 11 (296 Views)

Re: ssh connection refused

Hi,

Put your ssh host on the other server in hosts.allow file.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Honored Contributor
Deshpande Prashant
Posts: 1,252
Registered: ‎11-03-1999
Message 3 of 11 (296 Views)

Re: ssh connection refused

HI
Use the "-v" option with ssh to see where it is failing and also check the systlog file for more error information.

Thanks.
Prashant Deshpande.
Take it as it comes.
Regular Advisor
John McDen
Posts: 172
Registered: ‎02-20-2002
Message 4 of 11 (296 Views)

Re: ssh connection refused

Thank you for your help but ...I found out it is becaues of the firewall and need to open the port for it.

But how do I know which port is been used by ssh?

New to HP
Honored Contributor
Deshpande Prashant
Posts: 1,252
Registered: ‎11-03-1999
Message 5 of 11 (296 Views)

Re: ssh connection refused

Hi
By default ssh connects on port 22.
You may use lsof to check.

Thanks.
Prashant Deshpande.
Take it as it comes.
Honored Contributor
Clemens van Everdingen
Posts: 1,035
Registered: ‎09-13-1999
Message 6 of 11 (296 Views)

Re: ssh connection refused

Hi,

Port 22 should do mostly the trick with a default installation.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Regular Advisor
John McDen
Posts: 172
Registered: ‎02-20-2002
Message 7 of 11 (296 Views)

Re: ssh connection refused

Is there any command other than installing lsof to find out which port is been used?

New to HP
Honored Contributor
Clemens van Everdingen
Posts: 1,035
Registered: ‎09-13-1999
Message 8 of 11 (296 Views)

Re: ssh connection refused

Hi,

Do a more /etc/services | grep ssh

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Honored Contributor
Darrell Allen
Posts: 1,550
Registered: ‎10-23-2000
Message 9 of 11 (296 Views)

Re: ssh connection refused

Hi John,

Your sshd_config should list the Port used.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Esteemed Contributor
Mark Fenton
Posts: 429
Registered: ‎01-08-2001
Message 10 of 11 (296 Views)

Re: ssh connection refused

John,

While the connection is open,

# netstat |grep ssh

will also show what ports are being used.
Respected Contributor
Dirk Wiedemann
Posts: 173
Registered: ‎04-24-2002
Message 11 of 11 (296 Views)

Re: ssh connection refused

Hello John,

everything above is alright and works.
In addition: I think a good idea to check the port is a simple portscan from another system. If you have a linux box for example run "nmap hostname". So you gets the ssh port and also every open port the system is listening. It's important for every admin to know this at all time.

regards
Dirk
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.