OPEN SSH not listening on Port 22
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.
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.
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 disableFrom 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:
161 Answer
I ran:
sudo apt install openssh-serverand 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.