Fixing “WARNING: UNPROTECTED PRIVATE KEY FILE!” on Linux
If you are getting this error then you probably reset the permissions on your hidden .ssh directory in your user folder, and your keys aren’t going to work anymore. It’s very important that these files not be writable by just anybody with a login to the box, so openssh will give you an error if you try to use them.
The full error message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0744 for '/home/geek/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/geek/.ssh/id_rsa
To fix this, you’ll need to reset the permissions back to default:
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa.pub
If you are getting another error:
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/geek/.ssh/known_hosts).
This means that the permissions on that file are also set incorrectly, and can be adjusted with this:
sudo chmod 644 ~/.ssh/known_hosts
Finally, you may need to adjust the directory permissions as well:
sudo chmod 755 ~/.ssh
Fixing “WARNING: UNPROTECTED PRIVATE KEY FILE!” on Linux的更多相关文章
- ssh使用秘钥文件连接提示WARNING: UNPROTECTED PRIVATE KEY FILE!(转载)
转自:http://www.01happy.com/ssh-unprotected-private-key-file/ 在centos 6.4下使用ssh连接远程主机时,用的是另外一个密钥,需要用-i ...
- docker postgresql FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied
在docker中启动postgresql时出现错误 FATAL: could not access private key file "/etc/ssl/private/ssl-cert- ...
- Python paramiko 报错 paramiko.ssh_exception.SSHException: not a valid RSA private key file
报错的原因是选择的文件不是一个有效的 RSA 密钥文件 现在通过 ssh-keygen 默认生成的密钥文件是新的格式,并非 RSA 格式.打开文件可以看到是以 -----BEGIN OPENSSH P ...
- windows,linux,mac生成ssh public key 和 private key
https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair Creating the key How you create your SSH ...
- 密钥public/private key登陆linux
Public Key认证是什么这是一种认证方法,类似于常见的用户名密码认证方法.不同的是需要在客户端机器上保留一个很长很长的加密key,而在服务器端需要做出相应的配置.当客户端想要访问服务器时,服务器 ...
- Xshell配置密钥公钥(Public key)与私钥(Private Key)登录
ssh登录提供两种认证方式:口令(密码)认证方式和密钥认证方式.其中口令(密码)认证方式是我们最常用的一种,这里介绍密钥认证方式登录到linux/unix的方法. 使用密钥登录分为3步:1.生成密钥( ...
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录【已成功实例】
本文转自https://blog.csdn.net/qjc_501165091/article/details/51278696 ssh登录提供两种认证方式:口令(密码)认证方式和密钥认证方式.其中口 ...
- MyISAM引擎表出现“Error 'Incorrect key file for table”
mysql主从复制中的从库突然出现了警报,sql_thread停止了,show slave status\G;查看 mysql> show slave status\G ; . row **** ...
- Fix the “No Private Key” Error Message
This article will show you how to correct the “No Private Key” error message in Windows Internet Inf ...
随机推荐
- datagrid点击标题进行排序
步骤: 1.页面上首先设置datagrid的AllowSorting="true",以及指定排序方法OnSortCommand="DataGrid1_SortComman ...
- Eclipse: Resource is out of sync with the file system when publishing to tomcat server on Eclipse
Link: http://stackoverflow.com/questions/4343735/avoiding-resource-is-out-of-sync-with-the-filesyste ...
- ccc prefab
MonsterPrefab.js var Helpers = require('Helpers'); cc.Class({ extends: cc.Component, properties: { s ...
- BZOJ4426 : [Nwerc2015]Better Productivity最大生产率
如果一个区间包含另一个区间,那么这两个区间是否在一起的生产率是一样的. 将所有这种包含了其他区间的区间放入数组$b$,其余的放入数组$c$,有多个相同的时候则从$b$移一个到$c$. 那么$c$里所有 ...
- UVa 11922 & splay的合并与分裂
题意: 1个1—n的排列,实现一下操作:将a—b翻转并移动至序列的最后. SOL: splay维护区间的裸题——不过平衡树的题目貌似都是裸的吧...就是看操作的复杂程度罢... 如何取区间呢,我们在s ...
- BZOJ1798[Ahoi2009]Seq 维护序列seq 题解
题目大意: 有长为N的数列,有如下三种操作形式: (1)把数列中的一段数全部乘一个值; (2)把数列中的一段数全部加一个值; (3)询问数列中的一段数的和,由于答案可能很大,你只需输出这个数模P的值. ...
- BZOJ1012[JSOI2008]最大数maxnumber 题解
题目大意: 维护一个数列,有两种操作:1. 查询当前数列中末尾L个数中的最大的数,并输出这个数的值.限制:L不超过当前数列的长度.2.插入操作:将n加上t,其中t是最近一次查询操作的答案(如果还未执行 ...
- Maven_pom.xml介绍
Maven的pom.xml介绍 6.1 简介 pom.xml文件是Maven进行工作的主要配置文件.在这个文件中我们可以配置Maven项目的groupId.artifactId和version ...
- C#中Thread.sleep() 【转载】
我们可能经常会用到 Thread.Sleep 函数来使线程挂起一段时间.那么你有没有正确的理解这个函数的用法呢?思考下面这两个问题: 1.假设现在是 2008-4-7 12:00:00.000,如果我 ...
- [CareerCup] 15.1 Renting Apartment 租房
Write a SQL query to get a list of tenants who are renting more than one apartment. -- TABLE Apartme ...