1,首先查看网卡名字
ifconfig
2,编辑配置文件:
sudo vi /etc/network/interfaces
auto eno1
iface eno1 inet static
address 192.168.1.80
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
3,安装ssh软件
sudo apt-get install openssh-server openssh-client
修改配置文件:
sudo vi /etc/ssh/sshd_config
ListenAddress 192.168.1.80