Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using a Mac and VirtualBox to start a RedHat virtual machine. The instance is started with two adapters (first being NAT, and second being host-only-adapter).

The problem is that I am unable to SSH from my Mac to the VirtualBox guest machine using its IP (I am able to ping the IP, though).

I checked the iptables and SSH was allowed (port 22), sshd daemon is also running. Anything I am missing?

share|improve this question

migrated from stackoverflow.com Sep 12 '12 at 14:36

This question came from our site for professional and enthusiast programmers.

    
What error are you getting? Tried to run ssh -v ... to get a clue? – cababunga Sep 12 '12 at 6:15
    
This is what I get on my Mac: OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011 – Rajat Sep 12 '12 at 6:26
    
On my vm linux: OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010 – Rajat Sep 12 '12 at 6:27
    
No, I didn't mean to check version of your SSH. I meant to run it in verbose mode ssh -v user@host. – cababunga Sep 12 '12 at 7:09
    
This is what I get. OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: Connecting to 192.168.56.101 [192.168.56.101] port 22. debug1: connect to address 192.168.56.101 port 22: Connection refused ssh: connect to host 192.168.56.101 port 22: Connection refused – Rajat Sep 12 '12 at 15:34

Ah, I got the problem.. The thing was that I was using NAT as the network adapter one and hsot-only-adapter as the second one. I just needed to use the host-only-adapter as network adapter one and NAT as two, and the problem was solved.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .