I have a headless SSH server running Debian connected to the internet via wifi. I want to connect to it using its internal IP address from my Windows laptop using the ssh client Kitty, but the connection times out. I have been able to connect by forwarding port 22 to the server and connecting to the external IP address. I'm concerned this may be inefficient though; I'm using this for SFTP. I also cannot connect to the server's SMB share. I have had no problem connecting to this server with ssh or smb when it was connected via ethernet on another network, and I can connect to another Debian computer on the same wifi network with ssh and SMB. The server also randomly disconnects from the wifi network after about 5 or 10 minutes.
I tried pinging the server:
Code:
ping 10.0.0.62
Pinging 10.0.0.62 with 32 bytes of data:
Reply from 10.0.0.213: Destination host unreachable.
Reply from 10.0.0.213: Destination host unreachable.
Reply from 10.0.0.213: Destination host unreachable.
Reply from 10.0.0.213: Destination host unreachable.
Ping statistics for 10.0.0.62:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Here's the end of /var/log/auth.log. I ssh'd in using the external IP address. Then I tried connecting using the local IP address. I don't think it's showing anything for that local IP attempt.
Code:
Aug 12 19:58:19 localhost sshd[1669]: Accepted publickey for baku from <my external IP> port 56933 ssh2
Aug 12 19:58:19 localhost sshd[1669]: pam_unix(sshd:session): session opened for user baku by (uid=0)
Aug 12 20:08:46 localhost sshd[1435]: Received signal 15; terminating.
Aug 12 20:08:46 localhost sshd[1669]: pam_unix(sshd:session): session closed for user baku
Aug 12 20:09:33 localhost sshd[1149]: Server listening on 0.0.0.0 port 2222.
Aug 12 20:09:33 localhost sshd[1149]: Server listening on :: port 2222.
Aug 12 20:09:33 localhost sshd[1149]: Server listening on 0.0.0.0 port 22.
Aug 12 20:09:33 localhost sshd[1149]: Server listening on :: port 22.
Aug 12 20:10:14 localhost sshd[1680]: Accepted publickey for baku from <my external IP> port 57116 ssh2
Aug 12 20:10:14 localhost sshd[1680]: pam_unix(sshd:session): session opened for user baku by (uid=0)
Aug 12 20:11:48 localhost sudo: baku : TTY=pts/0 ; PWD=/home/baku ; USER=root ; COMMAND=/usr/bin/vim /var/log/auth.log
Aug 12 20:13:19 localhost sudo: baku : TTY=pts/0 ; PWD=/home/baku ; USER=root ; COMMAND=/usr/bin/vim /var/log/auth.log
Evo2 suggested in another thread that I check to see if the port is up with something like Nmap. I did nmap -T4 -A -v 10.0.0.62 and got this:
Code:
Starting Nmap 6.01 ( http://nmap.org ) at 2012-08-12 20:21 Eastern Daylight Time
NSE: Loaded 93 scripts for scanning.
NSE: Script Pre-scanning.
Initiating ARP Ping Scan at 20:21
Scanning 10.0.0.62 [1 port]
Completed ARP Ping Scan at 20:21, 0.74s elapsed (1 total hosts)
Nmap scan report for 10.0.0.62 [host down]
NSE: Script Post-scanning.
Read data files from: C:\Program Files (x86)\Nmap
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 2.42 seconds
Raw packets sent: 2 (56B) | Rcvd: 0 (0B)
The note in the results said to try -Pn so I did nmap -T4 -A -v -Pn 10.0.0.62 which gave me this:
Code:
Starting Nmap 6.01 ( http://nmap.org ) at 2012-08-12 20:24 Eastern Daylight Time
NSE: Loaded 93 scripts for scanning.
NSE: Script Pre-scanning.
Initiating ARP Ping Scan at 20:24
Scanning 10.0.0.62 [1 port]
Completed ARP Ping Scan at 20:24, 0.71s elapsed (1 total hosts)
Nmap scan report for 10.0.0.62 [host down]
NSE: Script Post-scanning.
Read data files from: C:\Program Files (x86)\Nmap
Nmap done: 1 IP address (0 hosts up) scanned in 2.96 seconds
Raw packets sent: 2 (56B) | Rcvd: 0 (0B)
Any idea how I could connect to ssh over LAN, connect to the SMB share, or stop the server from randomly disconnecting from wifi? Again, this server had no problem when connected via ethernet on another network, and another computer on this network connected via wifi has no problem with SSH and SMB connectivity, though it does randomly disconnect from the network.