CentOS创建免密码SSH(密钥)
2015-12-13 00:21
477 查看
1、输入以下命令:ssh-keygen -t rsa
2、输入命令ls:产生两个文件:id_rsa id_rsa.pub
3、复制id_rsa.pub,并命名为authorized_key
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
4、执行ssh localhost。
验证成功:
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 07:07:8e:1c:c0:7e:7f:1f:ca:6a:e6:d3:cb:7f:b7:a1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
2、输入命令ls:产生两个文件:id_rsa id_rsa.pub
3、复制id_rsa.pub,并命名为authorized_key
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
4、执行ssh localhost。
验证成功:
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 07:07:8e:1c:c0:7e:7f:1f:ca:6a:e6:d3:cb:7f:b7:a1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
相关文章推荐
- linux shell字符串内置的常用操作(获取长度、查找、替换)
- Linux更新Python版本及修改python默认版本的方法
- CentOS安装emacs出现The required function `tputs' was n
- #Linux学习笔记# Linux文件的属性以及权限说明
- 开发板和centos服务器tftp传文件
- Linux常用命令(自我总结)
- CentOS 6.5下OpenPortalServer部署指南
- 生产服务器环境最小化安装后 Centos 6.5优化配置[转]
- Linux ->> Ubuntu 14.04 LTE下配置SSH免密码登录
- centos 7 防火墙和端口配置
- Linux基础6 文件系统目录结构标准
- Linux GCC常用命令
- Redhat通过yum安装配置gcc
- 等待队列和poll机制
- CentOS 6.5修改英文为中文的方法
- Linux 常用查找文件或者文件内容
- Linux下程序开机自启动
- Linux下使用mail命令发送邮件
- linux定时执行php脚本
- Linux 下的tar.gz文件