I'm attempting to set up an SSH server on my local machine using OpenSSH. When I try to SSH from a remote host into my local SSH server, the SSH server doesn't respond and the request times out. I'm pretty sure there's a really obvious fix for this that I'm simply overlooking.
Here's what happens when I try to SSH in from a remote host:
yoshimi@robots:/$ ssh -vv volt@99.3.26.94
OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 99.3.26.94 [99.3.26.94] port 22.
debug2: fd 3 setting O_NONBLOCK
debug1: connect to address 99.3.26.94 port 22: Connection timed out
ssh: connect to host 99.3.26.94 port 22: Connection timed out
Where robots
is my remote host, and 99.3.26.94
is my local SSH server.
SSH Is Running
volt@arnold:~$ ps -A | grep sshd
5784 ? 00:00:00 sshd
Where arnold
is my local SSH server.
Port Forwarding Is Set Up On the Router
I've got my home router set up to forward ports 80 and 22 to my SSH server. Interestingly, port 80 worked without a hitch -- goes straight to the Apache web directory. Port 22 -- not so much.
NMap Says It's Filtered
yoshimi@robots:/$ nmap -p 22 99.3.26.94
Starting Nmap 6.47 ( http://nmap.org ) at 2015-06-02 14:45 EDT
Nmap scan report for 99-3-26-94.lightspeed.bcvloh.sbcglobal.net (99.3.26.94)
Host is up (0.33s latency).
PORT STATE SERVICE
22/tcp filtered ssh
Nmap done: 1 IP address (1 host up) scanned in 7.59 seconds
Where robots
is my remote host, and 99.3.26.94
is my local SSH server.
It's Not IPTables (I think)
volt@arnold:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
...And I don't have any other firewalls in place -- it's a relatively fresh Debian netinst.
So, then: What else could it be? It certainly appears to be a firewall-y sort of thing to just ignore traffic, but if it's not the router, it's not iptables, and it's not another firewall on the SSH server, ...what the heck else is there??
EDIT: Connection Request from Internal Network Error
yoshimi@robots:/$ ssh volt@192.168.1.90
ssh: connect to host 192.168.1.90 port 22: No route to host
arping remotehost
must answer only one hw address,then check if hwaddress is the same.Then check resolution withdig remotehost
anddig -x remoteip
,then check if the remote host is not pointing to 127.0.0.1,for this check the /etc/hosts of remote.And finally try to disable firewall,and check if ssh process is running.tail -f
whichever log file(s) you have sshd pointed at for output. If there is absolutely nothing in the logs, it is more likely a problem between the two devices, not on the ssh server.