Ubuntu固定靜態ip以及安裝ssh 等操作

2021-10-10 10:47:18 字數 860 閱讀 4099

注意開啟虛擬機器虛擬網路編輯器使其一一對應 子網最後乙個小數點後面的自定義設定

​ address = 子網 192.***.x.*** net =子網掩碼 255.255.255.0 儲存後自動變為24,不用管

​ gateway = nat設定中的閘道器 這裡必須一樣

2.4 這時候就可以ping www.baidu.com

2.5 更新安裝命令sudo apt-get update

apt-get install ssh

apt-get remove vim-common /

/刪除vi編輯的版本 這個版本不好用

apt-get install vim-gtk /

/安裝新的 vi編輯器

vi /etc/ssh/sshd_config /

/開啟後 找到permitrootlogin 把他後面的值改為 yes 後儲存 即 permitrootlogin yes

/etc/init.d/ssh restart /

/重啟 ssh 後可以開啟遠端連線工具連線

Ubuntu設定固定IP

為虛擬機器設定固定ip的方法 1 設定ip 閘道器 子網掩碼 vi etc network inte ces,然後新增如下內容 auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.161 ...

ubuntu設定固定IP

首先設定ip sudo gedit etc network inte ce 這裡除了gedit外還可以使用vim或vi 將其內容刪除 然後寫下以下內容 auto lo iface lo inet loopback auto etho iface etho inet static address 19...

ubuntu 配置固定ip

設定ip sudo gedit etc network inte ces auto lo iface lo inet loopback 注意這裡是本地連線,即連了網線的 auto eth0 iface eth0 inet static address 192.168.0.111 netmask 25...