You are not logged in.

#1 2014-01-11 13:23:54

danran
Member
Registered: 2014-01-11
Posts: 5

[SOLVED] SSH from Win7 host to ArchLinux guest on VirtualBox 4.3.6

Hi all!

- setup Arch on VBox 4.3.6 (Host OS: Win7)
- installed OpenSSH & enabled service (systemctl enable sshd)
- I can ssh to localhost.

- added 2nd Host-only adapter in VBox, IP for this is 192.168.56.1
- i can see this adapter in Win command prompt ifconfig, I can ping it from Windows
- I can't ping Archs "own" IP 10.0.2.15 (as shown by ip addr)
- tried to connect to VBox guest via SSH (PuTTY):
    - IP 10.0.2.15, Port 22: TIMEOUT
    - IP 192.168.56.1, Port 22: CONNECTION REFUSED

...lots of googling, reading wikis (incl. ArchWiki, of course...), forums, blogs, etc...

This is what I tried so far:
- add "sshd:ALL" to /etc/hosts.allow
- setup port forwarding on 1st VBox adapter (fwd. Port 3022 on Host to Port 22 on guest 192.168.56.1), tried to connect to 192.168.56.1:3022 via PuTTY
- installed virtualbox-host-dkms (as suggested by this rather recent blog: http://nerdzsoul.blogspot.de/2013/06/vi … -ssh.html)
No luck so far, connection is still refused.

ip addr on Arch shows
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:b0:95:7d brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:feb0:957d/64 scope link
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:e2:09:1b brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:fee2:91b/64 scope link
       valid_lft forever preferred_lft forever

Not sure if 3rd adapter is VBox adapter.

...so I'm running out of ideas.

Any suggestions?

Last edited by danran (2014-01-11 16:00:53)

Offline

#2 2014-01-11 13:26:35

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] SSH from Win7 host to ArchLinux guest on VirtualBox 4.3.6

Just use networking in bridged mode and don't mess with multiple nics.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2014-01-11 13:38:32

danran
Member
Registered: 2014-01-11
Posts: 5

Re: [SOLVED] SSH from Win7 host to ArchLinux guest on VirtualBox 4.3.6

- Shutdown Arch/VM
- changed VBox Network Adapter #1 to "Bridged" mode, disabled Adapter #2
- logged back into my VM, network is still working, sshd is running.

Still the same: PuTTY Connection refused on 192.168.56.1, Timeout on 10.0.2.15

So, just to clarify (this is the Newbie corner, after all...)
- which of the two IPs should work?
- do I have to configure port forwarding in VBox (e.g. 3022 => 22... on which IP?)

Offline

#4 2014-01-11 15:08:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] SSH from Win7 host to ArchLinux guest on VirtualBox 4.3.6

What is the output of

ip addr

on your Arch VM?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2014-01-11 15:13:50

danran
Member
Registered: 2014-01-11
Posts: 5

Re: [SOLVED] SSH from Win7 host to ArchLinux guest on VirtualBox 4.3.6

ip addr output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:b0:95:7d brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.57/24 brd 192.168.178.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:feb0:957d/64 scope link 
       valid_lft forever preferred_lft forever

...and that was it. IP has changed, didn't think of that.

Thanks a lot for you help!

Offline

#6 2014-01-11 15:33:17

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] SSH from Win7 host to ArchLinux guest on VirtualBox 4.3.6

So you are able to connect to the VM ok?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2014-01-11 15:34:36

danran
Member
Registered: 2014-01-11
Posts: 5

Re: [SOLVED] SSH from Win7 host to ArchLinux guest on VirtualBox 4.3.6

Yep, works like a charm!

Thanks again!

Offline

#8 2014-01-11 15:59:19

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] SSH from Win7 host to ArchLinux guest on VirtualBox 4.3.6

YW.  Edit the title of the first post and append a [SOLVED] to it so others know to ignore it and to potentially seek an answer therein.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB