I've been SSH'ing into my Raspi 3 B+ for some time now from my Mac OS with no issues.
I recently set a static IP address for my Pi on a LAN network connected via ethernet cable. I edited
sudo nano /etc/dhcpcd.conf
and then added at the bottom;
interface eth0
static ip_address=my.desired.ip.address
static routers=router.address
static domain_name_servers=DNS.address
Where my router address and DNS address were retrieved using
route -n
and cat /etc/resolv.conf
respectively.
I successfully SSH'd from a different laptop onto my Pi using this static IP address - this network is not connected to the internet.
Going back to my personal laptop which is on a wireless network (same as Pi) which is connected to the internet. I tried SSH'ing into my Pi as normal but the connection hangs.
I've confirmed my Pi's IP address with ifconfig wlan0
which is 198.123.52.xx
. When I try through terminal to SSH using sudo ssh [email protected] -v
I get the following;
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to 198.123.52.xx [198.123.52.xx] port 22.
The connection just hangs there.
- I've tried reinstalling SSH-server with
sudo apt-get purge ssh-server
thensudo apt-get install ssh-server
. - I've tried adding
IPQoS cs0 cs0
to the end of my/etc/ssh/sshd_config
file. - I've
#
commented out the static ip changes I made. - I've run
sudo apt-get update
andsudo apt-get upgrade
- All packages are installed and updated.
Do I need to remove a hostkey or flush something?
I'm not sure what else to do.
traceroute PIADDRESS
on the mac ?