基於上一節[原創: 雲服務器實戰系列1] 購買雲服務器git
在使用服務器以前, 咱們須要作一些簡單的配置: 禁用root & xshell遠程接入shell
爲何要禁止root帳戶直接登陸呢?你們都知道Linux系統的默認超級管理員是root,若是密碼設置太簡單,就很容易被黑客暴力破解,爲了服務器的安全起見,爲了更好地保護公司數據安全,最好禁止root用戶直接登陸系統。安全
useradd account
passwd account
在使用時, 能夠經過accout賬戶登陸到遠程服務器, 而後再經過su -l root
切換至root賬戶.bash
若是以爲此種操做很麻煩, 也能夠考慮賦予普通root權限:服務器
經過給普通用戶賦予root權限後, 可以使普通用戶擁有與root用戶基本相同的高級權限.網絡
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
account ALL=(ALL)
複製代碼
ALL修改完畢,如今能夠用account賬號登陸,而後用命令 su -
,便可得到root權限進行操做。session
account:x:500:500:account:/home/account:/bin/bash
複製代碼
修改後以下ssh
account:x:0:500:## account:/home/account:/bin/bash
複製代碼
保存,用account帳戶登陸後,直接獲取的就是root賬號的權限工具
[root@server ~]# id account
uid=500(account) gid=500(account) groups=500(account)
複製代碼
修改SSHD配置,禁用root登陸post
vi /etc/ssh/sshd_config
複製代碼
將:
#PermitRootLogin yes
複製代碼
並修改成:
PermitRootLogin no
複製代碼
重啓SSHD服務
service sshd restart
複製代碼
下次登錄的時候先用account用戶登陸,而後再使用su -l root命令,切換到root下便可!
安裝git時, 可選git bash工具, 若是咱們不想安裝其餘工具, 能夠使用git bash來遠程接入雲服務器
$ ssh 192.9x.9x.2xx -l account
The authenticity of host '192.9x.9x.2xx (192.9x.9x.2xx)' can't be established. RSA key fingerprint is SHA256:4t7QwJzphLiSUctGp5g1+rR5tU0ghMe9my9U5pKOq0U. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.9x.9x.2xx' (RSA) to the list of known hosts. account@192.9x.9x.2xx's password:
Last login: Tue Nov 5 22:25:03 2019 from 1xx.1xx.1xx.1xx
Welcome to Alibaba Cloud Elastic Compute Service !
[account@yunServer ~]$
複製代碼
Xmanager [1] 是一款小巧、便捷的瀏覽遠端X窗口系統的工具。在工做中常常使用Xmanager來登陸遠端的Solaris系統,在X窗口系統上做圖形化的操做。可是,Xmanager默認並不提供對於中文的支持,爲了可以瀏覽遠端的中文Solaris系統,就必須對Xmanager做一些定製化操做,提供中文的瀏覽能力。
Xmanager 是全新標準的跨平臺集成解決方案。它是一個一站式解決方案,這個軟件包含有如下一些產品:Xmanager 3D(OpenGL),Xshell,Xftp和Xlpd。
來源於百度百科
我的喜歡使用xmanager, 比較集全, 推薦使用.