This commit is contained in:
parent
a22fd46bcc
commit
07c2a6a33a
1 changed files with 8 additions and 5 deletions
|
@ -2,24 +2,26 @@ If you're anything like me, you have a copy of your annex on a computer running
|
|||
|
||||
ssh myhome.no-ip.org
|
||||
|
||||
This is totally great! Except, there is no way for your home computer to pull your changes, because there is no onthego.no-ip.org. You can get clunky and use a bare git repository and git push, but there is a better way.
|
||||
This is totally great! Except, there is no way for your home computer to pull your changes, because there is no *on-the-go.no-ip.org*. You can get clunky and use a *bare git repository and git push*, but there is a better way.
|
||||
|
||||
First, install openssh-server on your on-the-go computer
|
||||
First, install *openssh-server* on your *on-the-go* computer
|
||||
|
||||
sudo apt-get install openssh-server
|
||||
|
||||
Then, log into your home computer, with *port forwarding*:
|
||||
Then, log into your *home* computer, with *port forwarding*:
|
||||
|
||||
ssh me@myhome.no-ip.org L 2201:localhost:22
|
||||
|
||||
Your home computer can now ssh into your on-the-go computer, as long as you keep the above shell running. Presto, you can use the same shell to set up your remote:
|
||||
Your *home* computer can now ssh into your *on-the-go* computer, as long as you keep the above shell running.
|
||||
|
||||
You can now add your *on-the-go* computer as a remote on your *home* computer. Use the port forwarding shell you just connected with the command above, if you like.
|
||||
|
||||
ssh-keygen -t rsa
|
||||
ssh-copy-id localhost -p 2201
|
||||
cd ~/annex
|
||||
git annex remote add on-the-go ssh://localhost:2201/home/myuser/annex
|
||||
|
||||
And run normal annex operations:
|
||||
Now you can run normal annex operations, as long as the port forwarding shell is running².
|
||||
|
||||
git annex sync
|
||||
git annex get on-the-go some/big/file
|
||||
|
@ -50,3 +52,4 @@ In any case, the setup is much, much, much more secure than Dropbox. With Dropbo
|
|||
-----
|
||||
|
||||
¹ My always-on computer at home is a raspberry pi with a 32GB USB stick. Best self-hosted dropbox you could imagine.
|
||||
² You can just forward the port, but not open a shell, by adding the -N command. I rarely use this.
|
||||
|
|
Loading…
Add table
Reference in a new issue