JackDooner
Posts: 1
Joined: Sat Nov 21, 2015 9:12 pm

Can't SSH Rasp Pi remotely?

Sat Nov 21, 2015 9:15 pm

Hi, I have 2 Raspberry Pi's, both connected via Ethernet with static IP addressed.

I've assigned custom SSH ports for both. (2201 & 2202)

On my first Pi, I have no issues. I can SSH inside or outside my network. Perfect.

But on the other, I have issues from outside my network.

Everything is set up the exact same way (Port Forwarding etc...) and I have extensive experience in networking, so I know what I am doing. How ever I am left scratching my head.

Can anyone suggest further troubleshooting?

From the problematic Pi, I have full internet access. I can ping everything with no problems.

Thanks in advance.

sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am
Contact: Website

Re: Can't SSH Rasp Pi remotely?

Sun Nov 22, 2015 3:57 am

Run tcpdump on both Pis and observe what happens when you try to connect (i.e. do the packets make it as far as the Pi, do they have a funny address? does the Pi know how to route replies?)

ripat
Posts: 191
Joined: Tue Jul 31, 2012 11:51 am
Location: Belgium

Re: Can't SSH Rasp Pi remotely?

Sun Nov 22, 2015 7:59 am

Check if sshd is running and listening on the right port:

Code: Select all

$ sudo netstat -tlpn
Check the log. Raise the log level of the second pi ssd server to DEBUG or DEBUG2. Server side /etc/ssh/sshd_config:

Code: Select all

# Logging
SyslogFacility AUTH
LogLevel DEBUG2
restart sshd:

Code: Select all

$ sudo  /etc/init.d/ssh restart (or reload)
From the client side, login with the highest verbose available.

Code: Select all

$ ssh -vvv <target_address>
Using Linux command line usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Return to “Troubleshooting”