Network connections

Setting up the connection

1. VMware settings (Player)

The network settings are already set in the copy of the VM, so all you need to do is look for the Subnet address (an IP address that ends in a 1, and usually starts with 192.168).

Option 1: In CSPM, go to local settings, and click "Linux Subnet Address"

Option 2: Go to the "Network and Sharing Center" in Control Panel, and click on the "VMnet1" connection, then click details, to find the Subnet Address.


2.Linux Settings

Start Linux - "play" or "resume" virtual machine
Log on (click on "LinuxVM"; username is brain, password braindata)
In the Linux top toolbar, click the network icon, and select "Wired Settings" (image below)
Look for the ipv4 address; this may be all you need


Toggle network off then on to allow the new settings to take effect.
v


Add sshd

sudo apt install openssh-server

Troubleshooting Linux Settings

If the IP address changes with DHCP, the:

Set the IP address to be 100 on the subnet (e.g., 192.168.65.100), and set the subnet mask, and the "Default gateway address" will be the subnet address with a 1 at the end (example below).
Click "Apply" enter password (data)

Sometimes after an upgrade, there are changes to the network settings. 

sshd
To stop the slow SSH login, edit /etc/ssh/sshd_config (open a terminal, "su" to log on as super-user same password, cd to /etc/ssh, "gedit sshd_config) and add a like "UseDNS no, and make sure there are no DNS servers in the network configuration (above)

3. Windows (matlab) settings

Install "PuTTY" - Google it and choose the Windows installer.
After installing, run once and connect to the IP address of the Linux VM; say Yes to add the certificate to the cache.
If you get a timeout error, start a Command Prompt and ping the IP address
e.g., C:\Users\Paul>ping 192.168.65.100
If you don't get a connection, re-check the above settings (and make sure you "Activate" the changes in the Network Configuration).

Run CSPM, Options, Local settings, and enter the IP address and the username and password of the Linux user; do Ping, and "Test Send-Command".

Shared folder

Choose a shared folder; I use one on the network, but something simple is good (e.g., "V:\LinuxShare\"). Avoid spaces in any Linux path.

Edit the VM settings, choose the Options tab, Shared Folders
Always enabled
"Add..." the folder

This will now show up in Linux (at least in CentOS) under /mnt/hgfs.

In Windows, change the folder permissions so that all users can modify, read and write.

Updating (technical note)

To update:

  1. Change the VM's network settings to bridged
  2. Start/restart the VM
  3. Under System, Administration, Network, "Edit" the eth0 device and set to DHCP instead of static address
  4. Under System, Administration, Server Settings, Services, go to Network and restart
  5. To Add or Remove, go to Applications, Add/Remove Software
  6. To Update, go to Applications, System Tools, Software Updater
  7. Change back to static IP (System, Administration, Network, "Edit" the eth0 device)
  8. Change the VM settings back to Host-Only, restart