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;
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-serverthen
sudo apt-get install ssh-server.
- I've tried adding
IPQoS cs0 cs0to the end of my
#commented out the static ip changes I made.
- I've run
sudo apt-get updateand
sudo 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.