Jump to content

SSH into virtualbox

So im trying to ssh into virtualbox anyone got a good way or knows how?

 

 

I tried enabling second card on vb a portforwarded but got: kex_exchange_identification: read: Connection reset

Link to comment
Share on other sites

Link to post
Share on other sites

Can we get some information? 

 

What is the Host OS? What is the guest OS that you're presumably trying to reach? How is networking for the guest setup in virtualbox? Bridged? 

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, Depstros said:

So im trying to ssh into virtualbox anyone got a good way or knows how?

Should work the same way as connecting to an actual machine, provided the machine running the SSH server has an IP address you can reach and the firewall on either side isn't blocking you.

 

The error you got means something interrupted the connection between the client and server. Could be the firewall on the server allowing incoming connections, but blocking the outgoing response or some other weirdness. Have a look at these:

 

https://www.nixcraft.com/t/kex-exchange-identification-read-connection-reset-by-peer-error-on-linux/3927/1

https://serverfault.com/a/1015554

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Eigenvektor said:

Should work the same way as connecting to an actual machine, provided the machine running the SSH server has an IP address you can reach and the firewall on either side isn't blocking you.

 

The error you got means something interrupted the connection between the client and server. Could be the firewall on the server allowing incoming connections, but blocking the outgoing response or some other weirdness. Have a look at these:

 

https://www.nixcraft.com/t/kex-exchange-identification-read-connection-reset-by-peer-error-on-linux/3927/1

https://serverfault.com/a/1015554

i noticed the vb ubuntu has ip range 10.0 my pc has 192.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Depstros said:

i noticed the vb ubuntu has ip range 10.0 my pc has 192.

That's normal if the machine's network card is set to using NAT. It runs on a virtual network that allow communication between virtual machines and allows the machine to connect to the internet through your machine, but not necessarily incoming connections.

 

If you use bridged, as @rickeo mentioned, the machine should instead get an IP address on your local network, as if it was connected to the network directly. In this case you should normally be able to connect to it with SSH as if it was on the local network. At least this is how it has always worked for me 😅

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Eigenvektor said:

That's normal if the machine's network card is set to using NAT. It runs on a virtual network that allow communication between virtual machines and allows the machine to connect to the internet through your machine, but not necessarily incoming connections.

 

If you use bridged, as @rickeo mentioned, the machine should instead get an IP address on your local network, as if it was connected to the network directly. In this case you should normally be able to connect to it with SSH as if it was on the local network. At least this is how it has always worked for me 😅

how to bridge im kinda beginer

 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Depstros said:

how to bridge im kinda beginer

In the machine's VM settings, click on Network, where it says NAT. Switch that to Bridged Adapter instead.

 

image.png.4d9bb6b1e08fc8862312235d0d355447.png

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×