Skip to content

Instantly share code, notes, and snippets.

@fragolinux
Created May 4, 2024 08:46
Show Gist options
  • Save fragolinux/4cee96518cd4926cca404eba36411dd3 to your computer and use it in GitHub Desktop.
Save fragolinux/4cee96518cd4926cca404eba36411dd3 to your computer and use it in GitHub Desktop.
speed up nodered ssh vs host
cd /root/DockerIOT/nodered
shutdown nodered:
dstop
paste this in a new file named "config" in the nodered/ssh folder (for example: mcedit /root/DockerIOT/nodered/ssh/config), change the device ip with yours:
########################################
Host host
Hostname DEVICEIP
Port 22
IdentityFile ~/.ssh/id_nr
User root
StrictHostKeyChecking accept-new
PreferredAuthentications publickey
Compression yes
ControlMaster auto
ControlPath ~/.ssh/control:%h:%p:%r
ControlPersist 10m
########################################
fix permissions and restart nodered:
cd /root/DockerIOT/nodered
chown -R 1000:1000 data ssh ../dbs
dstart
now modify the exec nodes, the "command" text box should contain just "ssh host", nothing else, exactly this, that's it...
1st ssh will be a bit slow as always, next ones much faster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment