Skip to content

Instantly share code, notes, and snippets.

@ilhamarrouf
Created June 18, 2023 02:47
Show Gist options
  • Save ilhamarrouf/6f7d8d7ffb01f1efb7ca92b711427c46 to your computer and use it in GitHub Desktop.
Save ilhamarrouf/6f7d8d7ffb01f1efb7ca92b711427c46 to your computer and use it in GitHub Desktop.
Connection Setup
# setup with command $ bash <curl -s <raw url>)
ssh-keygen –t rsa
ssh-add ~/.ssh/id_rsa.pub
eval `ssh-agent -s`
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
# Copy the public key to the remote machine
# cat ~/.ssh/id_rsa.pub | ssh username@remote_machine_ip "mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && cat >> ~/.ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment