[LINUX] The story that the private key is set to 600 with chmod

I often stumble about the private key (id_rsa), so make a note.

Introduction

When I copy and paste my private key under .ssh and git clone it, the following error occurs.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/yu_uchida/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/yu_uchida/.ssh/id_rsa
Permission denied (publickey).
fatal: Could not read from remote repository.

I'm angry that the permissions are too open.

Solution

Set permissions to 0600 with chmod.

$ chmod 0600 id_rsa

You can now git clone.

Recommended Posts

The story that the private key is set to 600 with chmod
A story that struggled with the common set HTTP_PROXY = ~
The theory that the key to controlling infection with the new coronavirus is hyperdispersion of susceptibility
To make sure that the specified key is in the specified bucket in Boto 3
How to judge that the cross key is input in Python3
The story that fits in with pip installation
Python> set> Convert with set ()> dictionary is only key> I was taught how to convert the values of dictionary to set / dir ({}) / help ({}) / help ({} .values)
Just add the driver to the shape key with blender
The story that Japanese output was confused with Django
A story that failed when trying to remove the suffix from the string with rstrip
Try to play with the uprobe that supports Systemtap directly
Generate a password that is easy to remember with apg
A story about how to deal with the CORS problem
The story that Python stopped working with VS Code (Windows 10)
[VLC] How to deal with the problem that it is not in the foreground during playback
How to deal with the problem that the current directory moves when Python is executed from Atom
A story that is a little addicted to the authority of the directory specified by expdp (for beginners)
A story that didn't work when I tried to log in with the Python requests module
The story that CSS is no longer applied after uploading the Django app from local to AWS
The story that the version of python 3.7.7 was not adapted to Heroku
The story of not being able to run pygame with pycharm
Extract the index of the original set list that corresponds to the list of subsets.
March 14th is Pi Day. The story of calculating pi with python
A story that struggled to handle the Python package of PocketSphinx
Normalize the file that converted Excel to csv as it is.
The story that the guard was confined when the laboratory was converted to IoT
The story that inheritance behavior is quite different in each language
The story of making a module that skips mail with python
The universe is dangerous with PyEphem
[python] What is the sorted key?
A story that visualizes the present of Qiita with Qiita API + Elasticsearch + Kibana
To connect to WIFI that is restricted by MAC address with CentOS (NetworkManager).
With PEP8 and PEP257, Python coding that is not embarrassing to show to people!
[Python] How to set the (client) window size inside the browser with Selenium
I want to identify the alert email. --Is that x a wildcard? ---
[Introduction to Python] What is the method of repeating with the continue statement?
The story of trying to push SSH_AUTH_SOCK obsolete on screen with LD_PRELOAD
The story that Apache dealt with because it was down at AH00144
The story that had nothing to do with partitions when I did disk backup with dd for the first time
Prepare a development environment that is portable and easy to duplicate without polluting the environment with Python embeddable (Windows)
[Blender] How to set shape_key with script
The story of trying to reconnect the client
[Python] Set the graph range with matplotlib
Set the time zone to Japan Standard Time
The story of adding MeCab to ubuntu 16.04
How to set the server time to Japanese time
The story that FastAPI may take supremacy
The story that scipy suddenly stopped loading
Set the xticklabels color individually with matplotlib
Is the number equivalent to an integer?
The story that XGBoost was finally installed
Match the colorbar to the figure with matplotlib
The story of pep8 changing to pycodestyle
The road to compiling to Python 3 with Thrift
Set Expire to Redis key at once
The story of IPv6 address that I want to keep at a minimum
How to get the key on Amazon S3 with Boto 3, implementation example, notes
A story that sometimes does not work if pip is up to date
I tried to predict the horses that will be in the top 3 with LightGBM
I tried to summarize the operations that are likely to be used with numpy-stl
The story of the learning method that acquired LinuC Level 1 with only ping -t