I'm currently running Ubuntu in a VMworkstation Pro, when I try to SSH into it, the connection is rejected. But, I can ping Ubuntu IP successfully.
Asked
Active
Viewed 1.3k times
3 Answers
2
You need to start and enable (so that it runs on system startup) the SSH server:
sudo systemctl enable ssh.service
sudo systemctl start ssh.service
nixpower
- 1,230
- 6
- 19
1
You first need to install openssh-server package using the following command:
sudo apt install openssh-server -y
Make sure to activate the service and check if it really is:
sudo systemctl start ssh
sudo systemctl status ssh
To be sure that it is enabled at boot, execute the following command:
sudo systemctl enable ssh
Kian
- 343
0
If you are trying to connect from a Windows 10 machine, then Microsoft SSH may be getting in the way. You need to change the port in /etc/ssh/ssh_config in the VM to something other than 22. For example, if you choose 2222, then you would tell putty to also connect to port 2222.
Feldspar15523
- 401