Created
June 12, 2020 18:09
-
-
Save mindthump/887ba7e10712785488050a3377824976 to your computer and use it in GitHub Desktop.
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
# Passwordless SSH -> 192.168.0.11 as sheena | |
# From "https://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/" | |
# Login to local box... | |
# Generate RSA key | |
ssh-keygen -t rsa | |
# Create .ssh directory | |
ssh sheena@192.168.0.11 mkdir -p .ssh | |
# Copy id_rsa.pub to authorized_keys | |
cat .ssh/id_rsa.pub | ssh sheena@192.168.0.11 'cat >> .ssh/authorized_keys' | |
# Set permissions | |
ssh sheena@192.168.0.11 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys" | |
# Login without password | |
ssh sheena@192.168.0.11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment