Configure Rclone as if Local
It is possible to configure Rclone to work with Box without downloading Rclone, but this method is less reliable than the standard way and is thus not recommended.
Port Forwarding
When setting up box, Rclone needs access to a web browser; since the supercomputer doesn't have a browser, you'll need to connect one of its ports to your computer. To do so, add a little bit to your ssh
command:
ssh -L localhost:53682:localhost:53682 username@ssh.fsl.byu.edu
This tells ssh to make a tunnel, allowing your local machine (and its browser) to access the port Rclone will use for configuration. This tunnel is no longer required after Rclone is configured, so you needn't add '-L localhost:53682:localhost:53682'
on subsequent logins.
rclone config
To access Rclone itself, load the rclone
module:
module load rclone
Once that's done, run rclone config
. This will give you a few options:
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
Enter n
to make a new remote. Give it a name (e.g. box
), then choose which storage service you'd like to configure (you can type box
for box.byu.edu, drive
for Google Drive, etc.).
It'll ask for Box App Client Id
and Box App Client Secret
; most users should simply hit enter to leave these blank. You'll then be asked if you want to "Edit advanced config" (most users should enter n
):
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n
Next, you will be asked whether to use auto config:
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> y
Even though you are on a remote machine, you'll still say yes--your computer has access to the remote port that Rclone is about to use, so you are effectively using a local machine. When you enter y
, you'll see the following:
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Ctrl-click
the link or copy-paste it into your browser. If you're not logged in to box, it will ask for your credentials; use yournetid@byu.edu
for the email address. You'll then see a screen with a big blue Grant access to Box button--click it, and you should be greeted with a success message. Go back to the terminal and type y
at the prompt:
Got code
--------------------
[box]
type = box
token = {"access_token":"XXXXXXXX", token_type":"bearer", refresh_token":"XXXXXXXX", "expiry":"2019-01-01T12:00:00.000000000-06:00"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
...and you're finished configuring Rclone to work with Box.
Last changed on Wed Sep 4 18:09:02 2019