Created
June 5, 2020 02:59
-
-
Save Utshaw/7b20a327edd3eba699d36bad84e0e125 to your computer and use it in GitHub Desktop.
ssh into remote machine in linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let, user wants to ssh into remote machine from user machine | |
# User machine: | |
ssh-keygen | |
cat ~/.ssh/id_rsa.pub # then copy the content | |
# Remote machine | |
mkdir -p ~/.ssh && chmod 700 ~/.ssh ; touch ~/.ssh/authorized_keys | |
MY_KEY="<paste_here>" | |
echo "${MY_KEY}" >> ~/.ssh/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment