How to change SmartServer IP address using SFTP or ssh (KB1456)

The SmartServer IP address is typically changed using the SmartServer Configuration Web page.

You can also change the SmartServer LAN and WAN port assignments by modifying the following file and rebooting the SmartServer. 

/etc/network/interfaces

Make a backup of the file before changing it. You only need to modify the ports you are using :LAN port (eth0) and/or WAN port (eth1)
Example 1 using static IP address with only LAN port. WAN port not used
$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet static
address 10.0.0.228
netmask 255.255.255.0
gateway 10.0.0.1
       pre-up /root/.setup/ethernet/eth_mac eth0

iface eth1 inet dhcp
       pre-up /root/.setup/ethernet/eth_mac eth1

hotplug ip70
iface ip70 inet static
       pre-up ip link set name ip70 dev dummy0
       pre-up ifconfig ip70 multicast
       address 172.24.25.128
       netmask 255.255.255.0

Example 2 file for BACnet with using dhcp for the LAN port (eth0) and static IP address for the WAN port (eth1)
-----------
cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet static
address 192.168.92.3
netmask 255.255.255.0
       pre-up /root/.setup/ethernet/eth_mac eth0

iface eth1 inet dhcp
       pre-up /root/.setup/ethernet/eth_mac eth1

hotplug ip70
iface ip70 inet static
       pre-up ip link set name ip70 dev dummy0
       pre-up ifconfig ip70 multicast
       address 172.24.25.128
       netmask 255.255.255.0
apollo@smartserver-17qam88:~$

-----------

WinSCP
You will need to log in as root to change this file.

SSH
You can log in using apollo login but will need to edit will need to "sudo". The following instructions use nano to edit the interfaces file.

Copy the following console commands to a text only editor (like notepad) and then copy them one by one to the SmartServer console:
sudo cp /etc/network/interfaces /etc/network/interfaces_old
ls -l /etc/network
sudo nano /etc/network/interfaces
cat /etc/network/interfaces
sudo reboot