Other HUB nodes: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
[[Category:Xpub Admin Documentation]]
[[Category:Xpub Admin Documentation]]
==Adding new Node to [[HUB]]==
For graduation project or some Special issues, the [[XPUB HUB Node: Sandbox]] might not be adequate,
add new nodes can be added the XPUB [[Hub]] [[Tinc]] network
This page describes how to do it


==Steps to add a new Node to [[HUB]]==
==Steps to add a new Node to [[HUB]]==


* in your Pi's create a user <code>adduser<code> with same name as used in the [[XPUB Sandbox|Sandbox Pi]]
=== For Pi user (with sudo/root)===
. Keeping it the same as in the sandbox - will make things easier for us and gnd (no need to give him again your public ssh key)
Use this template to fill in all the fields and you go through the process
<pre>
<pre>
* add your public ssh key to your username in the Pi (same as mentioned) to ~/.ssh/authorized_keys
    user: psc
There is a trick to do this with
    Node name: ?XYZ?
`cat ~/.ssh/id_rsa.pub | ssh local.pi.IP.addr "cat >> ~/.ssh/authorized_keys"`
    IP: 10.0.0.???
    url: https://hub.xpub.nl/?XYZ?
    ssh public key:
    ?????????@??
</pre>
 
 
In your Pi: (or other Unix machine connected to the internet) create a user <code>adduser<code> with same username as used in the [[XPUB Sandbox|Sandbox Pi]]
* Keeping it the same as in the sandbox - will make things easier for us and gnd (no need to give him again your public ssh key)
 
In your Pi: Add your '''laptop's user's public ssh key''' to your Pi user account in ~/.ssh/authorized_keys  


* install Tinc on the Pis Instructions can be found here https://pzwiki.wdka.nl/mediadesign/Tinc
In your Pi: Install [[Tinc]] on the Pi. The instructions can be found in the [[Tinc]] page


* Add your chosen Node name and IP to https://pzwiki.wdka.nl/mediadesign/HUB#IP_allocation
Add your chosen Node name and IP to [[HUB]]
    * Student project IPs last number should have 3 digits, last one is Simon's 10.0.1.103, so you can start from there
* Student project IPs last number should have 3 digits


* disable ssh to your pi with password (allow ssh key only)
In your Pi: Disable ssh with password (allow ssh with sshkey only)
ensure:
ensure:
    * you laptops ssh public key is in your pi ~/.ssh/authorized_keys: `cat  ~/.ssh/authorized_keys`
* you laptops ssh public key is in your Pi ~/.ssh/authorized_keys: <code>cat  ~/.ssh/authorized_keys<code>
    * you can login to the Pi with ssh key:  ssh username@pi.ip.add -i ~/.ssh/id_rsa
* edit /etc/ssh/sshd_config: <code>sudo nano /etc/ssh/sshd_config</code
edit /etc/ssh/sshd_config: `sudo nano /etc/ssh/sshd_config`
* uncomment the line: <code>#PasswordAuthentication no</code>
and uncomment the line: #PasswordAuthentication no
* to: <code>PasswordAuthentication no</code>
to: PasswordAuthentication no
* reload ssh: <code>sudo systemctl reload ssh</code>
reload ssh: `sudo systemctl reload ssh`


On this side:  @Andre
=== For XPUB Staff (with sudo in XVM)==


* I will need to give invitation links to each node https://pzwiki.wdka.nl/mediadesign/HUB#Adding_a_new_thing
* ask gnd to associate your username+pub key to the Pi IP:


</pre>
* create a [[Tinc]] invitation links to each node [[HUB#Adding_a_new_thing]]
* ask gnd to associate the Pi user's username + ssh pubkey with the Pi IP

Revision as of 13:23, 14 May 2020


Adding new Node to HUB

For graduation project or some Special issues, the XPUB HUB Node: Sandbox might not be adequate, add new nodes can be added the XPUB Hub Tinc network

This page describes how to do it


Steps to add a new Node to HUB

For Pi user (with sudo/root)

Use this template to fill in all the fields and you go through the process

    user: psc
    Node name: ?XYZ?
    IP: 10.0.0.???
    url: https://hub.xpub.nl/?XYZ?
    ssh public key:
    ?????????@??


In your Pi: (or other Unix machine connected to the internet) create a user adduser with same username as used in the Sandbox Pi

  • Keeping it the same as in the sandbox - will make things easier for us and gnd (no need to give him again your public ssh key)

In your Pi: Add your laptop's user's public ssh key to your Pi user account in ~/.ssh/authorized_keys

In your Pi: Install Tinc on the Pi. The instructions can be found in the Tinc page

Add your chosen Node name and IP to HUB

  • Student project IPs last number should have 3 digits

In your Pi: Disable ssh with password (allow ssh with sshkey only) ensure:

  • you laptops ssh public key is in your Pi ~/.ssh/authorized_keys: cat ~/.ssh/authorized_keys
  • edit /etc/ssh/sshd_config: sudo nano /etc/ssh/sshd_config</code
  • uncomment the line: #PasswordAuthentication no
  • to: PasswordAuthentication no
  • reload ssh: sudo systemctl reload ssh

= For XPUB Staff (with sudo in XVM)

  • create a Tinc invitation links to each node HUB#Adding_a_new_thing
  • ask gnd to associate the Pi user's username + ssh pubkey with the Pi IP