Can rclone send a command between login and copy?

What is the problem you are having with rclone?

I'm logging into a Cisco device that doesn't go directly to bash. I need rclone to login with user/password and then send "expert\n" and then it can copy things.

Can I do this? If yes then what flag am I failing to find?

Run the command 'rclone version' and share the full output of the command.

rclone v1.63.1
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-78-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.6
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

None, it's SFTP to a local device.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy --max-age 1d --ignore-existing MY_DEVICE:/var/sf/backup/         ~/MY_DEVICE_Backups/

The rclone config contents with secrets removed.

There are two other remotes that are fine and look nearly identical.

[MY_DEVICE]
type = sftp
host = MY_DEVICE.ubcmain.com
user = admin
pass = NOT_THE_PASSWORD
md5sum_command = none
sha1sum_command = none

A log from the command with the -vv flag

I'm skipping this because I know what the issue is and just need the solution. Can I make rclone login, then send a command, then do it's copy stuff?

EDIT: Upgraded rclone and updated the version info above.

First update your rclone to the latest version. You are using some ancient one.

Done.

rclone v1.63.1 has successfully installed.

Any reason apt-get puts in the old one? It said I was on the latest and piping websites to sudo bash is generally frowned upon.

Your linux distro maintainers are not doing good job:)

Now back to your problem. Do I understand it correctly that you can not use sftp program directly? You have to ssh to this cisco box - enter some extra commands - and then sftp would work?

You know, I may not have been thinking this through as you're correct, and that doesn't sound like something that will work.

I was trying not to disable Cisco's shell as sometimes I need it, but maybe I just have to disable their shell. The only reason I'm doing rclone is because their sftp won't copy a 2GB file and their backups are over 2GB. :roll_eyes:

Just in case there is a work around:

If I SSH to the box and login I'm at Cisco's shell and I type expert to get to linux. Is there any way to get rclone past that? I'm guessing not but maybe I'll get a pleasant surprise.

Ok I do not think rclone can do this as it does not support ChallengeResponseAuthentication ( first authenticate via standard public key authentication, and then only if that succeeds, attempt keyboard-interactiv) - so not possible to connect to SFTP with 2FA etc.

You cisco box sounds for me like some form of this type of authentication - depends how they implemented it.

You could try e.g. FileZilla which does support it.

1 Like

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