How to configure ssh OS X host with Linux guest, so I can access my guest OS through SSH. I've tried:
But when I tried to ssh from host, it failed:
> ssh localhost ssh: connect to host localhost port 22: Connection refused
I've tried to set the ip (host 10.0.0.10, guest 10.0.2.15) on the
port forwarding, it gives the same output.
I've tried to bind the host to higher address (2222), but got no luck, the host still doesn't listen on port forwarding port.
It doesn't work like this answer: VirtualBox Host ssh to Guest
I could not even ping the guest from the host:
PING 10.0.2.15 (10.0.2.15): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 ^C --- 10.0.2.15 ping statistics --- 4 packets transmitted, 0 packets received, 100.0% packet loss
But ping works fine from guest to host, ssh from guest to localhost is also ok, the
netstat result is ok:
EDIT after switching to bridged mode, it works fine.