Today I created a CentOS virtual machine in VirtualBox on my Mac for testing Hadoop purpose, however, I was not able to SSH into the newly created virtual machine, and SSH command returned timeout error:
$ ssh root@10.0.2.15
ssh: connect to host 10.0.2.15 port 22: Operation timed out
The output of “ip addr show” in the CentOS: centos-ip-address To fix the issue, I did the following: 1. Go to Devices > Network > Network Settings 2. Click on “Port Forwarding” 3. Then enter the details similar as below: virtualbox-network-settings I did not need to restart the VM, and I just ran the following SSH command from host, and issue resolved:
$ ssh -p 2222 root@127.0.0.1
The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established.
ECDSA key fingerprint is SHA256:QWANQHt0hrV+l98si9RT1u5r0H9Q6A/GCe5jR+MQbHs.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
root@127.0.0.1's password:
Last failed login: Wed May 25 15:26:45 AEST 2016 from 10.0.2.2 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Wed May 25 15:22:16 2016 from localhost

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *