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.1k times
1
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,210
- 6
- 18
-
-
1@ClydeB If this answer helped you, please check the mark (left hand column) and accept the answer. – Charles Green Jan 07 '18 at 00:40
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
- 333
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
- 381
ssh -v theServer
will show more information. – waltinator Jan 06 '18 at 22:46sudo apt install openssh-server
ssh on Ubuntu largely refers to the client software which allows you ssh TO another box. sshd/openssh-server is the system daemon or server part of it which allows ssh INTO the box. (specifying version of Ubuntu may help - my answer is consequentially generic) – guiverc Jan 06 '18 at 23:20