Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4586  / 2 Years ago, fri, april 1, 2022, 5:21:13

I'm practicing to use the ssh command with two computer on a local network. From the 192.168.102.77 machine to 10.0.2.15 machine, SSH worked well. However, the inverse is not true, i.e., from the 10.0.2.15 machine to 192.168.102.77 machine, SSH didn't work well. Honestly, I don't know how to fix this problem. Could anyone be able to tell me how to enable this access with the ssh command?



P.S. 10.0.2.15 is a VM on a MBP and 192.168.102.77 is ip address of another MBP with Ubuntu OS.



[jeremie@my_account] ~ ❯ ssh -vvv 10.0.2.15                         
OpenSSH_7.3p1 Ubuntu-1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "10.0.2.15" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 10.0.2.15 [10.0.2.15] port 22.
debug1: connect to address 10.0.2.15 port 22:
Connection timed out ssh: connect to host 10.0.2.15 port 22:
Connection timed out


For the sudo lsof -inP, I got the following picture :



enter image description here



Interesting question : Do I have modify the network from VirtualBox of my VM of a certain way?


More From » networking

 Answers
1

I got the same problem earlier this week. The right way for you to use the ssh command on a virtual machine is to configure your virtual machine's network from VirtualBox as follows:



enter image description here



In fact, as @RichardRose and @TAtakaiWasumi pointed out, using ssh command on a VM needs to have an ip address similar to 192.168.x.x. I'm not an expert, but I read something related to this at a given time.



Hope it'll work!


[#12827] Saturday, April 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enytidge

Total Points: 169
Total Questions: 105
Total Answers: 107

Location: Papua New Guinea
Member since Tue, Aug 24, 2021
3 Years ago
;