Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.3 KB

SETUP_LOCAL.md

File metadata and controls

50 lines (36 loc) · 1.3 KB

Local Machine Setup

Dependencies

  • ssh
  • rsync

Info You’ll Need to Start

  • REMOTE_MACHINE_ALIAS — SSH alias for remote machine. Something like blood-dragon or sonic.
  • REMOTE_MACHINE_IP_OR_HOSTNAME — remote machine IP or hostname. Something like 42.42.42.42 or remote.domain.com.
  • REMOTE_MACHINE_USERNAME — your remote machine user. Something like john_doe.

Authentication

  1. Generate SSH key.
$ ssh-keygen -t rsa -b 4096 -C "{REMOTE_MACHINE_USERNAME}"
  1. Append the following content to ~/.ssh/config.
Host {REMOTE_MACHINE_ALIAS}
  User {REMOTE_MACHINE_USERNAME}
  HostName {REMOTE_MACHINE_IP_OR_HOSTNAME}
  Port 22
  IdentityFile ~/.ssh/{SSH_KEY_NAME}
  PreferredAuthentications publickey
  ControlMaster auto
  ControlPath /tmp/%r@%h:%p
  ControlPersist 1h
  • ControlMaster enables SSH connection reusage.
  • ControlPersist specifies for how long SSH should keep connection open.
  1. Copy and send public key to a person responsible for remote machine maintenance.
# macOS-specific. Linux users, you know what to do.
$ pbcopy < ~/.ssh/{SSH_KEY_NAME}.pub
  1. Once you’ve received confirmation that remote machine is ready for you, try the connection.
$ ssh {REMOTE_MACHINE_ALIAS}