I recently installed ssh server openssh-server in my fedora 16. I added my friend user account to my sshuser list. When my friend tried to connect my server computer via ssh using following command
ssh sudip@192.168.1.123
then it shows following error
ssh: connect to host 192.168.1.123 port 22: Connection refused
but when i tried locally from my machine the server was connected.
root@localhost /]# ssh sudip@192.168.1.123
sudip@192.168.1.123's password:
Last login: Tue Feb 26 13:24:42 2013 from localhost.localdomain
[sudip@localhost ~]$
Also, my firewall is allowing SSH and SHH is running on port 22.
So how can i troubleshoot the error??
thank you in advance.
EDIT:
I already started sshd using service sshd restart
EDIT2:
output of: iptables -n -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
46970 23M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
11 616 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
133 8552 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
2328 343K REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 59145 packets, 7665K bytes)
pkts bytes target prot opt in out source destination
Edit 3: result of traceroute 192.168.1.123
traceroute to 192.168.1.123 (192.168.1.123), 30 hops max, 60 byte packets
1 192.168.50.1 (192.168.50.1) 0.828 ms 0.805 ms 0.818 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
The workstation also uses fedora 16
Best Answer
You can use ssh -vvv user@192.x.x.x to get debug info on the connection. If -vvv is too much info you can use -vv or -v for less detailed debug info.
On the remote server, you should be able to see some info in /var/log/message or /var/log/syslog also.
A combo of those 2 things should point you in the right direction.