Star Hype News.

Premium celebrity moments with standout appeal.

general

OPEN SSH not listening on Port 22

By Matthew Cannon

I installed Ubuntu 20.4 (and included Open SSH) as virtual machine on Virtual Box on a Windows 10 laptop. I installed Samba to allow for machine name connection.

Below shows the listeners on Port 22, and the status of SSH.

enter image description here

The lines in my ssh_config file that are not commented out are:

Include /etc/ssh/ssh_config.d/*.conf
Host * Port 22
Match Group filetransfer ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp PasswordAuthentication yes PubkeyAuthentication no 

I was going to try a user/password authentication first, then after I got that working was going to do a public key authentication.

enter image description here

From Windows command prompt, I can ping the machine, but I cannot do a "telnet" to port 22.

I also ran this command to disable any firewall:

sudo ufw disable

From this related post (how to start listening on port 22), I tried the following from the Ubuntu terminal:

ssh -vvv localhost 

I'm not sure what that does, as I want to connect from my Windows machine. It responds with the following:

debug1: /etc/ssh/ssh_confg line 19: cinclude /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config lin 21: Applying optiosn for *
debug2: checking match for "group filetransfer' but localhost original localhost
Unsupported Match attribute Group
/etc/ssh/ssh_config line 51: Bad Match condition 

I'm not sure if I should have run that, but maybe it's indicating my ssh_config is not correct? I checked it with several blogs.

I followed the tutorial here to set up the user and group:

When I installed Ubuntu 20.4, I checked the box that said to "Install OpenSSH Server" as shown below:

enter image description here

16

1 Answer

I ran:

sudo apt install openssh-server

and now it's working. If anyone can give a better explanation, I will vote their answer. I thought that OpenSSH was already installed, and it included SFTP server, but maybe not. I had the sshd_config file on my disk.

I did a whole new install and it worked from the start. The differences were:

1) I didn't install any machine name resolution so Windows could connect by machine name (I will try that later)

2) I didn't install any desktop, using the command line only this time.

Other notes: If using Virtual Box for the Virtual Machine, changing network adapter to bridge adapter so you get a 192... address instead of a 10... address.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy