LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with ssh (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-ssh-716002/)

ssenthilkumar 04-01-2009 04:52 AM

problem with ssh
 
whenever i give ssh 192.168.20.165 pwd...

terminal is showing this message "ssh: connect to host 192.168.20.165 port 22: Connection refused"

any one please help me regarding this. (i am using debian)

vlademir 04-01-2009 04:57 AM

Quote:

Originally Posted by ssenthilkumar (Post 3494696)
whenever i give ssh 192.168.20.165 pwd...

terminal is showing this message "ssh: connect to host 192.168.20.165 port 22: Connection refused"

any one please help me regarding this. (i am using debian)

Please check if port 22 of your server is not blocked by the firewall or the router, if yes then forward the port 22 in your router and open port 22 on the firewall.

maxy7710 04-01-2009 05:16 AM

Check whether sshd service is active on the server.
check whether ping is happening.
also check telnet with port 22 to see whether its blocked.

linuxlover.chaitanya 04-01-2009 06:03 AM

It is refusing connections. That means either the port is blocked by firewall or ssh service itself is not running.

ssenthilkumar 04-01-2009 11:21 PM

Quote:

Originally Posted by maxy7710 (Post 3494719)
Check whether sshd service is active on the server.
check whether ping is happening.
also check telnet with port 22 to see whether its blocked.




Thx for ur reply...
ping is happening...
i dunno how to check with telnet. (provide me the syntax).. pls...

ssenthilkumar 04-01-2009 11:28 PM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3494763)
It is refusing connections. That means either the port is blocked by firewall or ssh service itself is not running.


Thx buddy....
i think the port is blocked by firewall.. but i dunno how to check whether port is blocked, n i dunno how to open the closed port (commands i dunno).. can u pls send me, if u know and as u knew i am using debian...

maxy7710 04-01-2009 11:49 PM

command for telnet

telnet 192.168.20.165 22

if u can login then port 22 is open.

when u say its blocked by firewall, u mean by OS firewall or physical firewall.

for OS firewall :- service iptables off

for physical firewall contact u r firewal admin & follow the procedure.

Mind you firewall is set for security, so it will be better if u just open port 22 which is required.

bcromwell 04-01-2009 11:55 PM

Try the following on the SSH server

/etc/init.d/iptables stop
try to ssh
/etc/init.d/sshd start
try to ssh
netstat -ln | grep 22
Look for something like
tcp 0 0 :::22 :::* LISTEN

If you see that and if neither work then there is something between the client and the server is dropping port 22 ie firewall or nat issue.

ssenthilkumar 04-02-2009 01:21 AM

Quote:

Originally Posted by maxy7710 (Post 3495650)
command for telnet

telnet 192.168.20.165 22

if u can login then port 22 is open.

when u say its blocked by firewall, u mean by OS firewall or physical firewall.

for OS firewall :- service iptables off

for physical firewall contact u r firewal admin & follow the procedure.

Mind you firewall is set for security, so it will be better if u just open port 22 which is required.

buddy,

this is the message i m getting,when i give
telnet 192.168.20.165 22
Trying 192.168.20.165...
telnet: Unable to connect to remote host: Connection refused

maxy7710 04-02-2009 02:13 AM

dude that means port 22 is not open on the server.

do service sshd restart on the server & then do

telnet 192.168.20.165 22

if it goes thru then u can do ssh

ssenthilkumar 04-02-2009 04:06 AM

so now i give the entire scenario..
sterday this was the scene

whenever i give ssh 192.168.20.165 pwd...

terminal is showing this message "ssh: connect to host 192.168.20.165 port 22: Connection refused"

so i tried everything that u guys told me, still i cannot open the port and ssh server is not installed in my system, ssh client is installed in my system..

i tried installing ssh server in my system, but it is displaying the error as,

(configure: error: *** zlib missing - please install first or check config.log ***)

so messed up.. not at all communicating any debian system, but it is communicating Red hat linux, if i use that same ssh..

so kindly help me...

maxy7710 04-02-2009 04:21 AM

Check whether ssh service is active on all the servers u r referring.

linuxlover.chaitanya 04-02-2009 04:27 AM

You do not need ssh server on every system. You will need it installed on the system that you are trying to ssh. It wont matter much which distribution it is running on. ssh server will run much the similar way. Just the starting and stopping of the service will differ.

ssenthilkumar 04-02-2009 11:26 PM

Quote:

Originally Posted by maxy7710 (Post 3495818)
Check whether ssh service is active on all the servers u r referring.

thanks ya.. now its working..

ssenthilkumar 04-02-2009 11:27 PM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3495822)
You do not need ssh server on every system. You will need it installed on the system that you are trying to ssh. It wont matter much which distribution it is running on. ssh server will run much the similar way. Just the starting and stopping of the service will differ.

thanks ya.. now its working..


All times are GMT -5. The time now is 07:34 AM.