DB2 10.5 for Linux, UNIX, and Windows

啟用或停用遠端 root 登入

必要時,可以視需要啟用或停用 root 帳戶的遠端登入。

關於這項作業

在安裝、升級或主機維護作業之後,可以停用 root 帳戶的遠端登入。

程序

  1. 若要啟用遠端 root 登入,請輸入下列指令:
    /etc/ssh/sshd_config:
    		PermitRootLogin yes #enabled
  2. 若要停用遠端 root 登入,請輸入下列指令:
    /etc/ssh/sshd_config:
    	PermitRootLogin no #disabled

結果

若要讓變更生效,必須重新啟動 SSH 常駐程式:
/etc/init.d/sshd restart