Showing results for 
Search instead for 
Do you mean 

ssh connection refused

SOLVED
Go to Solution
Regular Advisor

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
10 REPLIES
Honored Contributor [Founder]

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 [Founder]

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

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 [Founder]

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 [Founder]

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

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 [Founder]

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 [Founder]

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 [Founder]

Re: ssh connection refused

John,

While the connection is open,

# netstat |grep ssh

will also show what ports are being used.
Highlighted
Respected Contributor [Founder]

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