使用ssh-keygen 命令更改SSH Key 密码
2015-12-01 18:41
337 查看
如何在Linux, OpenBSD, FreeBSD, Apple OS X or Unix操作系统下为一个私钥修改密码?
你需要使用ssh-keygen 命令去为ssh生成,修改管理和转换密钥权限。你应该查看如下文件,在$HOME/.ssh 、 ~/.ssh 或 /home/you/.ssh/。 你可以使用如下命令查看这些文件:
ls -l $HOME/.ssh/
=> id_dsa : DSA authentication identity of the user
=> id_dsa.pub : DSA public key for authentication
=> id_rsa : RSA authentication identity of the user(私钥)
=> id_rsa.pub : RSA public key for authentication(公钥)
使用ssh-keygen修改密码:
-p 选项请求修改私钥的密码,而不是创建一个新的私钥。程序会提示你输入原始密码。然后输入两遍新密码。
-f{filename} 选项去指定密钥的名称。例如:
$ cd ~/.ssh/
修改DSA密码,输入:
$ ssh-keygen -f id_dsa -p
修改PSA密码,输入:
$ ssh-keygen -f id_rsa -p
原文链接:http://www.cyberciti.biz/faq/howto-ssh-changing-passphrase/
你需要使用ssh-keygen 命令去为ssh生成,修改管理和转换密钥权限。你应该查看如下文件,在$HOME/.ssh 、 ~/.ssh 或 /home/you/.ssh/。 你可以使用如下命令查看这些文件:
ls -l $HOME/.ssh/
=> id_dsa : DSA authentication identity of the user
=> id_dsa.pub : DSA public key for authentication
=> id_rsa : RSA authentication identity of the user(私钥)
=> id_rsa.pub : RSA public key for authentication(公钥)
使用ssh-keygen修改密码:
-p 选项请求修改私钥的密码,而不是创建一个新的私钥。程序会提示你输入原始密码。然后输入两遍新密码。
-f{filename} 选项去指定密钥的名称。例如:
$ cd ~/.ssh/
修改DSA密码,输入:
$ ssh-keygen -f id_dsa -p
修改PSA密码,输入:
$ ssh-keygen -f id_rsa -p
原文链接:http://www.cyberciti.biz/faq/howto-ssh-changing-passphrase/
相关文章推荐
- Android中几种常用的定时器和延时方法
- 信息安全系统设计基础实验三—20135215黄伟业20135222胡御风
- 企业shell编程基础问题解决实践-是骡子是马溜溜!
- Python WindowsError
- spark on yarn 出现的问题【测试wordcount程序遇到的错误,ipc.client连接到yarn的端口失败】
- 杭电-1229还是A+B
- 约瑟夫问题优化
- Python之服务器模块设计学习
- 常见面试题
- linux下测试宽带速度
- [JAVA]ServiceLoader类学习
- android 同时实现微信分享和微信登录功能
- JavaScript学习3-JS基本概念
- RecyclerView 实现gallery画廊效果
- 栈和队列笔记
- RecyclerView 实现gallery画廊效果
- RecyclerView 实现gallery画廊效果
- FZU 2148 Moon Game
- Map集合学习笔记
- linux常用网络命令