I think the people missed one point so I'm going to elaborate really short.
Guest - Virtual Machine, Linux,
Host - WIndows 10
Make sure that the guest os (linux) can access the internet (as long as you use default switch in the hyper-v manager that's fine).
in the guest, install net-tools and open ssh server. You need sudo privilidges.
sudo su, if not possible
su root, provide the password. You will get a
# instead of a
# apt-get install net-tools,
$ sudo apt-get install net-tools if you are not root. Use
sudo infront of each command if you are not root from herein.
apt-get install -y openssh-server - openssh server will now install.
Edit the configuration file for openssh once it's installed, it's in path /etc/ssh/ssh_config
Command text editor opens, key down to the line #Password Authentication yes, make sure that the # is removed (i.e the statement is uncommented, so it looks like):
Password Authentication yes . All is well? Continue on.
disable and enable ssh - because we just configured it.
# systemctl disable ssh
# systemctl enable ssh
you can also try if somehow above commands are not working:
# systemctl stop ssh
# systemctl start ssh
"In the end, make sure that you check that the ssh is running"
# systemctl status ssh
Peace of mind, When you are sure ssh is running
Find the ip of your guest os (linux). The ip looks like 188.8.131.521 and comes with a subnet mask (255.255.255.0) and default gateway (172.xyz.xyz.xyz. You need the ip, the first one that you find. You will need this ip on your host machine. Also remember your hostname. It is on your terminal, eg: misskiller@debian, here hostname is *misskiller
On the terminal type:
ip address (you will most likely find the ip of your computer in the eth0 adapter, for ease to read in the mess, you can also type command as below ->
(alternative way, longer command but easy fish)
ip address | grep -i eth0 (this is optional just for your ease, you can just go with 6. a)
- On your Host Machine, you can either use Putty or directly your PowerShell to connect.
SSH INTO THE GUEST*. For this example: hostname: misskiller, ip: 184.108.40.2061
A. From PowerShell
ssh firstname.lastname@example.org (basically hostname@ip)
You will be asked for the password that you setup at your machine. Type your password properly. You should be logged in now.
B. From Putty: same, just input the ip address in the hostname and press enter, type password into the terminal and you should be in there too.
This works - Tried and tested. :-)