Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 1.96 KB

SETUP_LOCAL.md

File metadata and controls

64 lines (44 loc) · 1.96 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}

Configuration

  1. Download latest release version of mainframer.sh and save it in your project. Most likely commit it to version control system so you could sync changes across all team members.

We recommend you to subscribe to changes in this repo (follow it on GitHub / watch for tweets of its maintainers / etc). This will allow you to apply best practises we found to make mainframer faster and safer.

  1. Carefully read Options documentation and configure mainframer for your kind of project.

  2. Finally you can test the build.

$ bash mainframer.sh echo "It works!" > success.txt