waggle-sensor / beehive-server

Waggle cloud software for aggregation, storage and analysis of sensor data from Waggle nodes.
13 stars 17 forks source link

Standardize beehive's ssh config for node controllers and edge processors #24

Closed seanshahkarami closed 6 years ago

seanshahkarami commented 6 years ago

I'm currently using an ssh config rule which allows ssh-ing devices via a config file. We should make something like this standard on beehive so there is a clear method to accessing nodes for debugging, applying updates, ad-hoc image pulls, etc.

To start out, things can be as simple as ssh nc12345 where 12345 is the port number. Later, we can do a search based method where you can use other criteria to connect.

seanshahkarami commented 6 years ago

For reference, what I'm using on my account is:

Host node*
  ProxyCommand ssh -q beehive1 'docker exec -i beehive-sshd nc -q0 localhost $(echo %h | sed "s/node//")'
  User root
  IdentityFile ~/.ssh/aot
  BatchMode yes
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null
  ControlPath ~/.ssh/ssh-%r@%h:%p
  ControlMaster auto
  ControlPersist 10m

Host edge*
  ProxyCommand ssh -q (echo %h | sed 's/edge/node/') nc -q0 10.31.81.51 22
  User root
  IdentityFile ~/.ssh/edge
  BatchMode yes
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null
  ControlPath ~/.ssh/ssh-%r@%h:%p
  ControlMaster auto
  ControlPersist 10m
seanshahkarami commented 6 years ago

Seems like this is working, at least for Raj. I'm closing this for now. We should just make sure we don't migrate the old tools for doing this to the new beehive instances.