Last active
May 4, 2018 08:33
-
-
Save patrikbeno/17b99d43382b6fcb7960317b23cbdafa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
mkdir -p $HOME/.ssh | |
cat >> $HOME/.ssh/authorized_keys << EOF | |
$(cat $HOME/.ssh/authorized_keys 2>/dev/null | grep -v "[email protected]") | |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyGejgisBIuWRQcfD9GsIKgWmTkJo2QT6d3M3Geo/CwJKEsVjynQtFNFefK+OCVwYi73zhA5tvoTKMhTuPtNZsakhwDxWDvukrFDMEfs+LPwc5xKjyO1y+TPkm/wu/gFh5bDcAk3LB9dVY14+3mggyicICrAXR2rvg09cqivNPn1kBXqNs7aPgbWcYs5h/fq8mi7THoOGNbwoP5ncQzjqkQHI9S3d0F8NQFphUzSUFhxZ0pfUkEwJh/zzrXZip+P1+wrwk9dRgxNVS1T/JkG+K8fvXzxPkN7uv/EP4Usk/yG06kpSzdoQVXRVYjfy4BuDDFBE7tHzx0iqwzoRrzBIVQ== [email protected] | |
EOF | |
chmod 700 $HOME/.ssh | |
chmod 600 $HOME/.ssh/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment