centos安装ssh的方法:
1. 安装openssh-server
yum install -y openssl openssh-server
2. 修改配置文件
用vim打开配置文件/etc/ssh/sshd_config
将上图的PermitRootLogin,RSAAuthentication,PubkeyAuthentication的设置打开。
3、启动ssh的服务:
systemctl start sshd.service
4、设置开机自动启动ssh服务
systemctl enable sshd.service
5、设置文件夹~/.ssh的访问权限:
$ cd ~ $ chmod 700 .ssh $ chmod 600 .ssh/* $ ls -la .ssh total 16 drwx------. 2 root root 58 May 15 00:23 . dr-xr-x---. 8 root root 4096 May 15 00:26 .. -rw-------. 1 root root 403 May 15 00:22 authorized_keys -rw-------. 1 root root 1766 May 15 00:21 id_rsa -rw-------. 1 root root 403 May 15 00:21 id_rsa.pub
authorized_keys文件存储的是客户端的公共密钥。
以上就是“centos如何安装ssh? centos如何安装软件”的详细内容,更多请关注1818ip网其它相关文章!
相关文章
标签:CentOS
- •centos中的uuid是必须的吗 centos安装minicom必须联网吗
- •centos如何查看用户 centos如何查看用户密码
- •centos重启后时间不对怎么办 centos时间不同步怎么解决
- •如何解决centos7下chrome打不开的问题 centos安装chrome
- •centos下ping不通网关怎么办 centos ping不通网关怎么解决
- •centos7系统找不到网卡 centos7装完系统找不到网卡
- •centos中pear命令无法使用怎么办 pear是什么意思
- •centos怎么实现开机进入命令行模式 centos7开机进入命令行模式
- •centos无法进入图形界面怎么解决 centos无法进入图形界面
- •centos默认用户名密码是什么 centos默认用户名密码