rNLKJA / Australia-Social-Media-Analytics-on-the-Cloud

2023 S1 Cluster and Cloud Computing Assignment 2
http://172.26.130.83:3000
MIT License
4 stars 0 forks source link

Quick Instances SSH #8

Open rNLKJA opened 1 year ago

rNLKJA commented 1 year ago

For now everyone should have access to all instances. Please make sure that your unimelb VPN is connected due to there is no public IP available.

For quick ssh to any instances, please setup the following ssh config, this definitely save your time from hassles like enter password, you could reference the guide below:

  1. Check ~/.ssh/config file existence
  2. Edit config file, in config file you need to include:
    • Host [alias]
    • Hostname [Instance IP Address]
    • IdentityFile [Your SSH Private Key]
    • AddKeysToAgent yes
    • User ubuntu
  3. Save the ssh
# Example code snippet
Host *
ServerAliveInterval 120 

Host ccc-backend
        Hostname 172.26.128.118
        IdentityFile ~/.ssh/mrc.key
        AddKeysToAgent yes
        User ubuntu

# this is the same as ssh -i ~/.ssh/mrc.key ubuntu@172.26.128.118

# after saving the config file, connect via the command:
ssh ccc-backend

Please make sure that your unimelb VPN is connected due to there is no public IP available.


Some issues:

rNLKJA commented 1 year ago
Host *
ServerAliveInterval 120

Host ccc-backend
        Hostname 172.26.128.118
        IdentityFile ~/.ssh/mrc.key
        AddKeysToAgent yes
        User ubuntu
Host ccc-database
        Hostname 172.26.135.245
        IdentityFile ~/.ssh/mrc.key
        AddKeysToAgent yes
        User ubuntu
Host ccc-frontend
        Hostname 172.26.130.83
        IdentityFile ~/.ssh/mrc.key
        AddKeysToAgent yes
        User ubuntu