Approve incoming Device ID from command line

For a headless VM, how to use command line to approve:

[FDJJY] 04:57:12 INFO: Connection from 33.55.222.111:33333 with unknown device ID YW2KWA2-...

Thanks.

The GUI ā€œapprovesā€ this by crafting a configuration that includes the device and posting that to the backend. That requires some logic on the outside, so itā€™s not trivial to do from a shell script or so unfortunately.

Why it is not possible to make this call available from command line as syncthing add [DEVICEID]? It looks like the ā€œAddā€ action is the only thing that is needed from user.

Oh, itā€™s possible, itā€™s just not implemented. You are the first to ask for it.

You can use syncthing-cli for that.

3 Likes

Letā€™s hope Iā€™m not necro-bumping here, but is this still the way to go for headless node set-up?

I have to setup a distant machine powered with Ubuntu 14.04. Added ā€˜http://apt.syncthing.net/ā€™ and installed Syncthing. syncthing-inotify is also available and thatā€™s it AFAIK.

Is syncthing-cli available for Ubuntu Trusty?

I would suggest for headless VMs to connect via SSH and access the GUI through port forwarding (SSH tunnel).

http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html

Thankss Intdel.

X11 forwarding the gui will do it thiss time as this is a remote desktop.

I find it hard (but possible) this very remarquable piece of software is so much CLI unfriendly. Will go back to the Documentation and check again.

EDIT: virtual keyboard sh*$^ā€¦ joy!

Ok, thannk you for syncthing-cli Canton7

You can download syncthing-cli from here: http://build.syncthing.net/job/syncthing-cli/

I donā€™t believe itā€™s received much TLC since 0.12 came out so Iā€™m not sure how well it works these days.

Itā€™s all just a config file in the end. Just add a line or two for the device and restart.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.