Thursday, June 09, 2022

My notes

 

Secure Connection


  1. Establish secure connection from the workstation to the servers.
  2. Run deployment tasks
  3. Upload configuration files
  4. Log in
  5. Put the public key on the server
  6. Create a secure connection using the private key
  7. Avoid password based authentication
  8. Use SSH tunneling to reuse the connection for other services

SSH Keys


Setup passwordless login on the server

  • Use ssh-keygen to make a new pair of SSH keys
  • Create a virtual private server in the admin panel
  • Copy the SSH keys using ssh-copy-id utility for providers that setup password-based authentication

Success Criteria

Login using SSH as root

ssh root@server-hostname-or-ip-address

Remote Shell

  • Install ssh-agent on Mac OS
  • Connect to server from the client, use ssh command
  • Define USER environment variable to specify hte user on the host
  • Define HOST environment variable to specify the remote server's hostname or IP address
  • The default configuration file used is ~/.ssh/config
  • The default identity file (private key) is ~/.ssh/id_rsa
  • The identity_file, login_name and port values can be specified per host in the configuration file (~/.ssh/config)

File Transfers


Steps

  1. Signup for hosting provider
  2. Create a node
  3. Provision a node
  4. Deploy code
  5. Maintain node

  • Figure out which steps are done by the customer and which steps are done by the product.
  • Establish secure