Rclone command line

hello all, it is possible to use rclone without configuration or using switches for example with sftp:

rclone copy test.raw --sftp-host=1.2.3.4 --sftp-user=test --sftp-pass=test123 sftp:

or something similar.

thnx.

Yes it is, and you almost got the syntax right! Note the :sftp:

# rclone ls --sftp-host=localhost --sftp-user=rclone --sftp-ask-password :sftp:

2019/09/13 15:20:32 Failed to create file system for ":sftp:": couldn't connect to ssh-agent: SSH agent requested but SSH_AUTH_SOCK not-specified

Works for me

$ rclone ls --sftp-host=localhost --sftp-user=rclone --sftp-ask-password :sftp:
Enter SFTP password: 

which rclone version are you using? (rclone version)

┌──[root@master]─[~]
└──> # rclone version
rclone v1.49.2

  • os/arch: linux/amd64
  • go version: go1.12.9

With the options you've set rclone should be asking for a password.

Did you set any rclone config in environment variables?

env | grep RCLONE

Can you run the ls command with -vv and post what it prints?

└──> $ env|grep RCLONE
┌─[✗]──[root@master]─[~]
└──> $ rclone -vv ls --sftp-host=localhost --sftp-user=rclone --sftp-ask-password :sftp:
2019/09/14 11:30:48 DEBUG : rclone: Version "v1.49.2" starting with parameters ["rclone" "-vv" "ls" "--sftp-host=localhost" "--sftp-user=rclone" "--sftp-ask-password" ":sftp:"]
2019/09/14 11:30:48 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
2019/09/14 11:30:48 Failed to create file system for ":sftp:": couldn't connect to ssh-agent: SSH agent requested but SSH_AUTH_SOCK not-specified

I managed to replicate that finally

$ unset SSH_AUTH_SOCK
$ unset SSH_AGENT_PID 
$ rclone ls --sftp-host=localhost --sftp-user=rclone --sftp-ask-password :sftp:
2019/09/15 18:14:39 Failed to create file system for ":sftp:": couldn't connect to ssh-agent: SSH agent requested but SSH_AUTH_SOCK not-specified

I made a fix here, can you give it a go?

https://beta.rclone.org/branch/v1.49.0-066-g8f1061e0-fix-sftp-askpass-beta/ (uploaded in 15-30 mins)

it works! thnx a lot.

──> # rclone ls --sftp-host=localhost --sftp-user=rclone --sftp-ask-password :sftp:
Enter SFTP password:
2019/09/16 07:04:09 Failed to create file system for ":sftp:": NewFs: couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain

Thanks for testing :slight_smile:

I've merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.50

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