ubuntu下容許設置root權限,ssh遠程登陸

SSH服務器,能夠經過SSH協議來訪問遠程服務器,代替telnet和ftp。可是ubuntu默認是不啓用root用戶也不容許root遠程登陸的。因此須要先啓用root用戶shell

 

啓用root用戶:sudo passwd root      //修改密碼後就啓用了。ubuntu

 

安裝OpenSSH server:windows

1. 使用apt命令安裝openssh server服務器

$ sudo apt-get install openssh-server


 

 

2. 能夠對 openssh server進行配置ssh

$ sudo vi /etc/ssh/sshd_config


找到PermitRootLogin no一行,改成PermitRootLogin yesspa

 

3. 重啓 openssh serverrest

$ sudo service ssh restart


 

4. 客戶端若是是ubuntu的話,則已經安裝好ssh client,能夠用下面的命令鏈接遠程服務器。code

$ ssh xxx.xxx.xxx.xxx


若是是windows系統的話,能夠使用SSH Secure Shell等ssh軟件進行遠程鏈接。orm

相關文章
相關標籤/搜索