This is a bad thing because then you're not the only one able to use the key, which defeats the purpose. What happened is the key you're trying to use (key.pem in the example above) is too accessible to users on the system. But before we get to that, let's get some background on why this error shows up. It's a common error to see when trying to log in to a server via SSH and a key file, and luckily it has a relatively easy fix. It is required that your private key files are NOT accessible by others.īad permissions: ignore key: /path/to/my/key.pem Have you run in to the warning message below, and don't know how to fix it? Warning: Permanently added '192.168.1.1' (RSA) to the list of known WARNING: UNPROTECTED PRIVATE KEY FILE! 0644 for '/path/to/my/key.pem' are too open. Not only do you need to run SSH with extra commands, but it turns out that the key file itself needs to have certain properties.
Usernames and passwords are pretty straight-forward, but things can get a bit more confusing when it comes to using private keys. When connecting to a server, you'll usually need some kind of authentication to log in, whether it be a username/password or key file.