Can't SSH with new install of Mint 20.2 [SOLVED]

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ablebaker
Level 3
Level 3
Posts: 145
Joined: Mon Jun 05, 2017 1:14 pm

Can't SSH with new install of Mint 20.2 [SOLVED]

Post by ablebaker »

I installed Mint 20.2 today, including OpenSSH-client and OpenSSH-server, but can't ssh into or from the raspberry pi computers on my local network.

When I attempt to ssh from the Linux Mint computer, the cursor just hangs after entering the ssh address; when I try to ssh to the Linux Mint computer from another computer on the network, the result is "ssh: connect to host 10.0.1.11 port 22: No route to host".

I have static IP addresses for the computers on the network that I set through the router. I had no problem using SSH for this with Mint 19.3.
Any assistance in getting this to work would be most welcome. My knowledge of networking details is very limited. Here is output from inxi, if that helps:

Code: Select all

System:
  Kernel: 5.4.0-80-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 5.0.5 wm: muffin 5.0.1 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Machine:
  Type: Desktop Mobo: Intel model: NUC7i3BNB v: J22859-303 serial: <filter> 
  UEFI: Intel v: BNKBL357.86A.0067.2018.0814.1500 date: 08/14/2018 
CPU:
  Topology: Dual Core model: Intel Core i3-7100U bits: 64 type: MT MCP 
  arch: Amber Lake rev: 9 L2 cache: 3072 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 19200 
  Speed: 1100 MHz min/max: 400/2400 MHz Core speeds (MHz): 1: 1100 2: 1100 
  3: 1100 4: 1100 
Graphics:
  Device-1: Intel HD Graphics 620 driver: i915 v: kernel bus ID: 00:02.0 
  chip ID: 8086:5916 
  Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.6 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel v: kernel 
  bus ID: 00:1f.3 chip ID: 8086:9d71 
  Sound Server: ALSA v: k5.4.0-80-generic 
Network:
  Device-1: Intel Ethernet I219-V driver: e1000e v: 3.2.6-k port: f040 
  bus ID: 00:1f.6 chip ID: 8086:15d8 
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: f040 
  bus ID: 3a:00.0 chip ID: 8086:24fd 
  IF: wlp58s0 state: down mac: <filter> 
Drives:
  Local Storage: total: 405.22 GiB used: 43.19 GiB (10.7%) 
  ID-1: /dev/sda vendor: Fujitsu model: MHZ2160BH FFS G1 size: 149.05 GiB 
  speed: 1.5 Gb/s serial: <filter> rev: 008C scheme: MBR 
  ID-2: /dev/sdb vendor: Crucial model: CT275MX300SSD4 size: 256.17 GiB 
  speed: 6.0 Gb/s serial: <filter> rev: R040 scheme: GPT 
Partition:
  ID-1: / size: 250.66 GiB used: 43.18 GiB (17.2%) fs: ext4 dev: /dev/sdb2 
Sensors:
  System Temperatures: cpu: 58.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://mirrors.seas.harvard.edu/linuxmint-packages uma main upstream import backport
  2: deb http://mirror.math.ucdavis.edu/ubuntu focal main restricted universe multiverse
  3: deb http://mirror.math.ucdavis.edu/ubuntu focal-updates main restricted universe multiverse
  4: deb http://mirror.math.ucdavis.edu/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:
  Processes: 215 Uptime: 51m Memory: 7.66 GiB used: 1.49 GiB (19.4%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
ivar
Level 5
Level 5
Posts: 617
Joined: Sun Mar 21, 2021 10:30 pm
Location: far north

Re: Can't SSH with new install of Mint 20.2

Post by ivar »

sounds like firewall blocking all incoming requests,

open firewall from the settings / administration menu, Add a new rule for incoming ssh from the desired adresses

edit:reread you post, outgoing should be allowed out of the box, And incoming should give you a different error message if it was a firewall issue.
Can you ping between the different hosts?
ablebaker
Level 3
Level 3
Posts: 145
Joined: Mon Jun 05, 2017 1:14 pm

Re: Can't SSH with new install of Mint 20.2

Post by ablebaker »

Hi Ivar--I've made some progress: I discovered that I had not established a wireless connection during the initial setup; once that had been made I can access the remote Raspberry Pis from the newly-installed Mint 20.2 computer. However, when I try to ping the Mint computer from one of the remote computers, I get the message, "Destination Host Unreachable."

Additional info: I have the firewall application that came with Mint configured to allow both Incoming and Outgoing with rules 22/tcp ALLOW IN Anywhere, 22/tcp ALLOW OUT Anywhere, 22/tcp(v6) ALLOW IN Anywhere, 22/tcp(v6) ALLOW OUT Anywhere.

So...it's working to access the remote computers, but I can't ssh into the Mint computer from the remotes.

Thank you for your help.
ivar
Level 5
Level 5
Posts: 617
Joined: Sun Mar 21, 2021 10:30 pm
Location: far north

Re: Can't SSH with new install of Mint 20.2

Post by ivar »

have you verified that the ssh server process is running ?
ablebaker
Level 3
Level 3
Posts: 145
Joined: Mon Jun 05, 2017 1:14 pm

Re: Can't SSH with new install of Mint 20.2

Post by ablebaker »

Not sure how to tell if the ssh server process is running. But System Monitor shows two "ssh-agent" processes.
And

Code: Select all

$ ps -aux | grep ssh
shows

Code: Select all

root         875  0.0  0.0  12176  4520 ?        Ss   Jul24   0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
linuxus+    1212  0.0  0.0   6032   456 ?        Ss   Jul24   0:00 /usr/bin/ssh-agent /usr/bin/im-launch cinnamon-session-cinnamon
linuxus+    2353  0.0  0.0   6032  2036 ?        S    Jul24   0:00 /usr/bin/ssh-agent -D -a /run/user/1000/keyring/.ssh
linuxus+   19321  0.0  0.0   9032   668 pts/0    S+   10:45   0:00 grep --color=auto ssh
Do these findings confirm that the ssh server process is running?
ivar
Level 5
Level 5
Posts: 617
Joined: Sun Mar 21, 2021 10:30 pm
Location: far north

Re: Can't SSH with new install of Mint 20.2

Post by ivar »

sshd is the ssh daemon.

my linux 20.2 with working ssh lists 2 sshd processes.

Not sure whats acting up here, sounds like time for someone more well versed than me in this stuff to chime in
ablebaker
Level 3
Level 3
Posts: 145
Joined: Mon Jun 05, 2017 1:14 pm

Re: Can't SSH with new install of Mint 20.2

Post by ablebaker »

A minor update, perhaps not significant: System Monitor now shows "ssh" and "ssh-agent" after ssh-ing into the remote Raspberry Pis.

Anyway, thank you very much for the time you've taken to respond. I'm grateful for your help.
ivar
Level 5
Level 5
Posts: 617
Joined: Sun Mar 21, 2021 10:30 pm
Location: far north

Re: Can't SSH with new install of Mint 20.2

Post by ivar »

a minor omission in the last post, sshd is the ssh server daemon

x@stuepc:~$ netstat -l
Pågående internettikoblinger (bare tjenere)
Proto Recv-Q Send-Q Lokal Adresse Ekstern Adresse Status
tcp 0 0 localhost:domain 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN


try to run netstat -l to see which ports is listening
ablebaker
Level 3
Level 3
Posts: 145
Joined: Mon Jun 05, 2017 1:14 pm

Re: Can't SSH with new install of Mint 20.2

Post by ablebaker »

Here's the info from:

Code: Select all

$ netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 localhost:domain        0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:ipp             0.0.0.0:*               LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
tcp6       0      0 [::]:ipp                [::]:*                  LISTEN     
udp        0      0 0.0.0.0:36384           0.0.0.0:*                          
udp        0      0 localhost:domain        0.0.0.0:*                          
udp        0      0 0.0.0.0:631             0.0.0.0:*                          
udp        0      0 0.0.0.0:mdns            0.0.0.0:*                          
udp6       0      0 [::]:39403              [::]:*                             
udp6       0      0 [::]:mdns               [::]:*                             
raw6       0      0 [::]:ipv6-icmp          [::]:*                  7          
raw6       0      0 [::]:ipv6-icmp          [::]:*                  7   
I don't know how to interpret this. There is more from netstat -l (Active UNIX domain sockets (only servers)), if you want that output. Thanks.
ivar
Level 5
Level 5
Posts: 617
Joined: Sun Mar 21, 2021 10:30 pm
Location: far north

Re: Can't SSH with new install of Mint 20.2

Post by ivar »

lloks the same as mine. It shows that its listening for incoming ssh connection
ablebaker
Level 3
Level 3
Posts: 145
Joined: Mon Jun 05, 2017 1:14 pm

Re: Can't SSH with new install of Mint 20.2

Post by ablebaker »

Hi Ivar--I looked at the wireless network settings and discovered that the IP address for the Linux Mint computer had changed from the one I had previously set on the router. I'm guessing that occurred when I made the wireless connection yesterday. How or why it changed from the address I'd set using the router, I don't know. But I'm now able to ssh between all clients and servers on the network.
Again, I appreciate the time you've taken to work on resolving this problem. Thank you.
Locked

Return to “Networking”