<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> cs631apue-bounces@lists.stevens.edu &lt;cs631apue-bounces@lists.stevens.edu&gt; on behalf of Jan Schaumann &lt;jschauma@stevens.edu&gt;<br>
<b>Sent:</b> Thursday, August 29, 2019 6:14 PM<br>
<b>To:</b> cs631apue@lists.stevens.edu &lt;cs631apue@lists.stevens.edu&gt;<br>
<b>Subject:</b> Re: [cs631apue] Connecting to Netbsd running on VM</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Elliot Wasem &lt;ewasem@stevens.edu&gt; wrote:<br>
&gt; I figured it out by doing the following:<br>
&gt; <br>
&gt; 1. Setup the 2nd network interface on the VM to be host only<br>
<br>
You don't even need a second nic.&nbsp; A single nic in NAT<br>
mode ought to be sufficient.<br>
<br>
&gt; 2. Restart your vm, and install openssh. Start sshd<br>
<br>
No need to install openssh; it's part of the NetBSD<br>
operating system, so you just need to configure the OS<br>
to start it.&nbsp; You can do that at install time via the<br>
dialog, or later by adding<br>
<br>
sshd=YES<br>
<br>
to /etc/rc.conf and either rebooting or running<br>
<br>
/etc/rc.d/sshd start<br>
<br>
&gt; 3. Find the inet ip address for your vm<br>
&gt; 4. Through VirtualBox, forward some port (i used 2222) from 127.0.0.1 on<br>
&gt; your host machine to the inet ip on port 22 of your VM.<br>
<br>
In the VirtualBox configuration, you can even leave<br>
out the guest IP and simply forward a given port from<br>
localhost to the VM.&nbsp; You can also do that via the<br>
command-line:<br>
<br>
VBoxManage modifyvm &quot;your VM name here&quot; --natpf1 &quot;ssh,tcp,127.0.0.1,2222,,22&quot;<br>
<br>
See also:<br>
<a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.virtualbox.org%2Fmanual%2Fch06.html%23natforward&amp;amp;data=02%7C01%7Cmalexan3%40stevens.edu%7C64dae6246997447956ff08d72cce4dc4%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637027136898067585&amp;amp;sdata=q6Fx5iwn%2Fw9iqEffSmHiXiMvCAwiAoIyxhPk7ZmDlmY%3D&amp;amp;reserved=0">https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.virtualbox.org%2Fmanual%2Fch06.html%23natforward&amp;amp;data=02%7C01%7Cmalexan3%40stevens.edu%7C64dae6246997447956ff08d72cce4dc4%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637027136898067585&amp;amp;sdata=q6Fx5iwn%2Fw9iqEffSmHiXiMvCAwiAoIyxhPk7ZmDlmY%3D&amp;amp;reserved=0</a><br>
<br>
I'll see if I can make the time to provide a<br>
step-by-step guide to set up your VM, but don't wait<br>
for those instructions.<br>
<br>
-Jan<br>
_______________________________________________<br>
cs631apue mailing list<br>
cs631apue@lists.stevens.edu<br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
</div>
</span></font></div>
</body>
</html>