freeBSD網絡配置及root賬戶和密碼驗證配置

一. IP地址配置

修改/etc/rc.conf,需要/etc/rc.d/netif重起,或reboot才能生效

1. 設置IP地址
ifconfig_re0="inet 192.168.0.76  netmask 255.255.254.0"
2. 設置默認網關
defaultrouter="192.168.0.1"

二. SSH開啓root賬號密碼驗證

1. 修改 /etc/ssh/sshd_config

ee /etc/ssh/sshd_config

在最後中加入 
                       PermitRootLogin yes #允許root登錄
                       PermitEmptyPasswords no #不允許空密碼登錄
                       PasswordAuthentication yes # 設置是否使用口令驗證。

2. 編輯/etc/inetd.conf,去掉ssh前的#
ee  /etc/inetd.conf

3. 編輯 ee /etc/rc.conf
最後加入:sshd_enable="yes"即可 

4./etc/rc.d/sshd restart
查看ssh進程:  netstat -an 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章