黑猴子的家:Ubuntu18.04.2 安装 openssh-server 插件

1、修改国内镜像
heihouzi@ubuntu100:~$ su - root
passwd ******
root@ubuntu100:~# cd /etc/apt/
root@ubuntu100:/etc/apt# cp sources.list sources.list.bb
root@ubuntu100:/etc/apt# vi sources.list
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
2、软件升级
root@ubuntu100:~# apt update
root@ubuntu100:~# apt upgrade
root@ubuntu100:~# apt-get update
root@ubuntu100:~# apt-get upgrade
3、安装 openssh-server

安装ssh服务才可以 xshell远程连接,需要更改国内镜像,和升级软件才能成功

//安装ssh服务才可以 xshell远程连接
root@ubuntu100:~# apt-get install openssh-server

//检查ssh服务开启状态
root@ubuntu100:~# ps -s | grep ssh
root@ubuntu100:~# ps -e | grep ssh

//启动ssh服务
root@ubuntu100:~# /etc/init.d/ssh start

//停止ssh服务
root@ubuntu100:~# /etc/init.d/ssh stop

//重启ssh服务
root@ubuntu100:~# /etc/init.d/ssh restart
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容