I’d like to know how you have, or would, set up SSH client and server on a Fedora/Linux VM running on Windows.
So far I’ve been able to connect directly to a separate computer running Fedora at home, from the VM and from putty, and have reached being given the password prompt. I haven’t been able to connect to the server on the VM without getting immediately refused. I’ve tried NAT and bridged for the VM port forwarding.
I’m learning all this stuff now, and thought I’d ask around for general tips on this. If you’d like more details about what I’ve done, such as logs, I’d be happy to provide em a little later.
On the VM you would need to enable the sshd service sudo systemctl enable sshd.service and start the daemon sudo systemctl start sshd.service.
You also would need to verify that ssh is allowed through the firewall. I use the gui firewalld-config which would also need installed. sudo dnf install firewalld-config I do not remember whether ssh is allowed to port 22 by default or not.
I just tested with my VM of F37 and as soon as I enabled the sshd on the vm I was able to connect from the host to that VM with ssh, so it seems the firewall allows that by default.
I do think that using nat will be a hindrance unless you have configured the host to allow port forwarding. I use bridged on the VM and connect it to the default virbr0 device on my fedora host. I also use libvirt and QEMU on my fedora host. Cannot speak to what would work with a windows host and using virtualbox with a fedora VM.
Thank you, I believe all this should be in order, but I’ll look over it again as I’ve been trying various things and possibly messed something up. I did also manually configure selinux with regards to the ssh ports. I believe I have 22 and another port I want to use set up to be allowed to listen on the vm.
Glad it’s worked out for you. For what it’s worth, you shouldn’t have to do any SELinux configuration for SSH unless you’re having sshd listen on a non-standard port.
It’s been a while since I’ve worked with Virtual Box, but when troubleshooting networking on it, you’ll probably find that it’s easier for your VM to reach out to things rather than things reaching into the VM.
One other thing to note, if you VM is Fedora Workstation, sshd is not enabled by default like it is on Fedora Server.