基于上一节[原创: 云服务器实战系列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, 比较集全, 推荐使用.