Connecting to freebsd on VM with ssh

Hello, I have some problems with connecting to my freebsd !

It's my ifconfig:
Screenshot_20181031_215347.png



and as you can see, there is not any ip to starts with my range .

and It's my virtualbox configure :

Screenshot_20181031_215553.png


I have same configure for my another machine that is ubuntu and i can ssh on it .

Sorry if it's stupid problem .

Best
 
Your em0 interface appears to be connected to the network. Is sshd(8) actually running? Are you perhaps trying to SSH as root (that's not allowed)?
 
My VirtualBox configuration for the VM includes two network interfaces:
  1. Host-Only adapter
  2. NAT
I believe, you need to create a virtual device for the 1st one in VirtualBox/Preferences/Network.

The sshd(8) runs on the first interface. It allows to connect to VM from localhost only:

Code:
skhal@host:~ % sysrc -a | grep '\(em0\|sshd\)'
ifconfig_em0: inet 192.168.56.100/24
sshd_enable: YES
sshd_flags: -o ListenAddress=192.168.56.100
 
My VirtualBox configuration for the VM includes two network interfaces:
  1. Host-Only adapter
  2. NAT
I believe, you need to create a virtual device for the 1st one in VirtualBox/Preferences/Network.

The sshd(8) runs on the first interface. It allows to connect to VM from localhost only:

Code:
skhal@host:~ % sysrc -a | grep '\(em0\|sshd\)'
ifconfig_em0: inet 192.168.56.100/24
sshd_enable: YES
sshd_flags: -o ListenAddress=192.168.56.100
Thank You, It's solved .
 
Hello, I have some problems with connecting to my freebsd !
I have same configure for my another machine that is ubuntu and i can ssh on it .

Sorry if it's stupid problem .

Best

Glad it's fixed. Out of curiosity ... Your configured network was set to NAT, not BRIDGED, and getting a 10.0.2.0/24 IP. What's your LAN IP?
 
Please share your solution, it might be helpful for other people running into the same problem.
I used this configure on virtualbox :
  1. NAT
  2. Host-Only adapter
and then I edited my /etc/rc.conf and added this :
ifconfig_em1="DHCP"

That was all .
 
Back
Top