[cs631apue] Connecting to Netbsd running on VM

Mario P Alexandre malexan3 at stevens.edu
Sun Sep 1 16:59:17 EDT 2019


Hi,

I've been having a similar problem trying to SSH into the VirtualBox VM on Windows 10. I have tried the port forwarding instructions with a NAT connection, bridged adapter instructions, and host-only adapter but every time my SSH connection has been denied. I have verified that the VM has been listening on Port 22 but the Host just cannot establish a connection. I have attempted this on both my desktop and laptop that run Windows 10. Has anyone been able to get it to work and maybe we can talk and see the differences between our configurations? Thank you.
________________________________
From: cs631apue-bounces at lists.stevens.edu <cs631apue-bounces at lists.stevens.edu> on behalf of Jan Schaumann <jschauma at stevens.edu>
Sent: Thursday, August 29, 2019 6:14 PM
To: cs631apue at lists.stevens.edu <cs631apue at lists.stevens.edu>
Subject: Re: [cs631apue] Connecting to Netbsd running on VM

Elliot Wasem <ewasem at stevens.edu> wrote:
> I figured it out by doing the following:
>
> 1. Setup the 2nd network interface on the VM to be host only

You don't even need a second nic.  A single nic in NAT
mode ought to be sufficient.

> 2. Restart your vm, and install openssh. Start sshd

No need to install openssh; it's part of the NetBSD
operating system, so you just need to configure the OS
to start it.  You can do that at install time via the
dialog, or later by adding

sshd=YES

to /etc/rc.conf and either rebooting or running

/etc/rc.d/sshd start

> 3. Find the inet ip address for your vm
> 4. Through VirtualBox, forward some port (i used 2222) from 127.0.0.1 on
> your host machine to the inet ip on port 22 of your VM.

In the VirtualBox configuration, you can even leave
out the guest IP and simply forward a given port from
localhost to the VM.  You can also do that via the
command-line:

VBoxManage modifyvm "your VM name here" --natpf1 "ssh,tcp,127.0.0.1,2222,,22"

See also:
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.virtualbox.org%2Fmanual%2Fch06.html%23natforward&amp;data=02%7C01%7Cmalexan3%40stevens.edu%7C64dae6246997447956ff08d72cce4dc4%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637027136898067585&amp;sdata=q6Fx5iwn%2Fw9iqEffSmHiXiMvCAwiAoIyxhPk7ZmDlmY%3D&amp;reserved=0

I'll see if I can make the time to provide a
step-by-step guide to set up your VM, but don't wait
for those instructions.

-Jan
_______________________________________________
cs631apue mailing list
cs631apue at lists.stevens.edu
https://lists.stevens.edu/mailman/listinfo/cs631apue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20190901/3c577a42/attachment.html>


More information about the cs631apue mailing list