4 ms·
I was looking fir a way to easily _move_ (not copy) a file on a different device through the syncthing interface. The alternatives I know of are scp and SFTP. H
by kovek 10y ago
I was looking fir a way to easily _move_ (not copy) a file on a different device through the syncthing interface. The alternatives I know of are scp and SFTP. However, in that case, you need to know the ip address of your devices. My devices tend to change networks often, so it would be nice to easily scp or SFTP to a device, through any (secure) means possible, without having to check their IP addresses every time.
Please let me know if you know of such a solution!
- rovr138 10y agoDo you have a computer that doesn't change IP? You can use it as a way to bridge all computers. Basically, have all computers create a tunnel to this computer and then you can access them. I do something similar with a small VPS, but it could be something at home. What I do is that all my computers automatically connect to this VPS and bind to a different port. This is with SSH (and autossh). If I want to access computer X, I can SSH to this VPS use the port that I know computer X has. For your scenerio, you can forward this port to your local machine and run rsync -p to it...
- kovek 10y agoThank you for the suggestion! I like it, and it is somewhat what I had in mind for thing. You access all the devices the same way. That, I would use maybe half the time. However, sometimes my devices are on the same network. What if both of my devices are on the same network? I think that I would prefer not to send the files through the internet in that case. One solution for each vae would be nice (please share if you do have one). However, one solution for both would be nice.
- qwertyuiop924 10y agoWell, if you've got a computer in your house, you can use that as the server (as I described another post, above), and if it's in your house it would likely be on the same network as your other devices.
- rovr138 10y agoAssuming your server is also at home, what will happen is: Computer A > router > local server > router > Computer B. Instead of: Computer A > router > Computer B You can use some scripting and configuration to get the second one if at home. But basically you have to have a way to guarantee that both devices are at home. To make sure both devices are home, you can assign static IP at the router level to the devices. Now, if both devices are wireless. – Check you are home by checking the SSID you are connected to. – If you are home, ping the other device static ip. – If it responds, you can connect directly to it If any of these fail, connect to example.com.
- qwertyuiop924 10y agoYeah, so SCP/SFTP copy, not move (but you can delete the copy from the original computer to simulate that, which is your plan, I assume). Here's my solution: I have a central SSH server where I store all my files. When I want a file on a given device, I pull it down from there. If I want to add a new file or update a file, I push a file up. Pretty simple. You do need at least one computer that stays in a constant location (typically at your house) to do this. From there, you portforward SSH to a high numbered port (it keeps every bot in the world from knocking, and some ISPs block 22) on your router. However, if you're like most of us, your ISP doesn't assign you a static IP. But, because your IP probably changes only rarely (probably only sometimes if your router goes down), you actually needn't use dynamic DNS. Furthermore, because you aren't actually publishing on that address, you can use any domain, regardless of ugliness, and there are plently of DNS services willing to offer you a subdomain for free. I reccomend freedns.afraid.org, myself. It doesn't work for everyone, likely, but it works well enough for me.
- majewsky 10y ago> so it would be nice to easily scp or SFTP to a device, through any (secure) means possible, without having to check their IP addresses every time. If these are public IP addresses, any DynDNS provider could work well. If these are internal IP addresses chosen by DHCP and you control the DHCP server, pin the MAC addresses of the devices to fixed IPs. They will still do DHCP, but get the same IP every time.