While you are accessing it via a keyboard and monitor locally plugged in, you login with the credentials you supplied and immediately configure the network card. Once you have your static IP configured, you can then logout, unplug the monitor and keyboard and access it remotely from SSH at that point using PuTTY.
Here is the Network Configuration part of my server setup tutorial. Make sure you utilize the name of your network card instead of what I have listed which is likely going to be named differently. (enp0s3)
Here are the pertinent steps from that article copied here: (text in red will be specific to you so adjust as necessary)
Code:
sudo vi /etc/netplan/01-netcfg.yaml
Code:
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: false
dhcp6: false
addresses: [192.168.107.2/24]
gateway4: 192.168.107.1
nameservers:
addresses: [192.168.107.212,192.168.107.213,1.1.1.1,8.8.8.8]
NOTE #1: The above YAML format is extremely sensitive to spaces. Each indentation needs to be exactly 2 spaces. Visit NetPlan.io for more information.
NOTE #2: The network card name (enp0s3) might be something different on your machine, be sure to use it instead of what I have.
NOTE #3: You may need to manually remove the DHCP record (lease) associated to this Ubuntu server from your DHCP server so the correct IP can be found by other machines on the network. This can be avoided by temporarily configuring the VM Network Adapter connection to be "Host Only Network" instead of "VM Network" so the server is isolated during setup...at least until you reach the testing of the static IP below.
NOTE #4: You might also need to manually add a HOST(A) record to your Windows DNS server (for srv-ubuntu.mydomain.com and srv-ubuntu.work.mydomain.com)
Verify that the configuration file syntax is good:
Code:
sudo netplan --debug generate
If there were no errors, restart the network by typing the following:
Code:
sudo netplan --debug apply
Sanity check! Type "ip address" and make sure the settings are correct. Then type ping www.google.com or similar and see if ping works.
LHammonds
Bookmarks