Skip to content

Instantly share code, notes, and snippets.

@lparolari
Created August 22, 2019 20:09
Show Gist options
  • Save lparolari/5c150665a1c8dfbbfd14d2601f84cb89 to your computer and use it in GitHub Desktop.
Save lparolari/5c150665a1c8dfbbfd14d2601f84cb89 to your computer and use it in GitHub Desktop.

Dev Cluster Seup

  • 2 server
  • 1 client

Server1

sudo adduser luca
sudo usermod -aG sudo luca

Server2

sudo adduser luca
sudo usermod -aG sudo luca

Client

client> sudo adduser luca            # your user
client> sudo usermod -aG sudo luca
client> ssh-keygen -t rsa -b 4096 -C "luca@ubuntu-srv-1"
client> ssh-keygen -t rsa -b 4096 -C "luca@ubuntu-srv-2"
client> nano .ssh/config
# paste in the following
Host 1srv
    HostName 192.168.23.199         # your ip
    User luca
    IdentityFile ~/.ssh/id_rsa_luca_ubuntu-srv-1

Host 2srv
    HostName 192.168.23.197         # your ip
    User luca
    IdentityFile ~/.ssh/id_rsa_luca_ubuntu-srv-2
client> ssh 1srv
1srv> mkdir .ssh
1srv> nano .ssh/authorized_keys
# paste in the public key from luca@ubuntu-srv-1
1srv> exit
client> ssh 2srv
2srv> mkdir .ssh
2srv> nano .ssh/authorized_keys
# paste in the public key from luca@ubuntu-srv-2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment