#[resolved] SFTP and SCP does not seem to be working for RMPP with firmware 3.15.3.0

1 messages · Page 1 of 1 (latest)

trail berry
#

So, I have had set up Public Key Authentication between my Mac and the RMPP in the past, and the file transfer via the SCP was working correctly, like below command:
However, exactly after the latest update of the RMPP firmware to the 3.15.3.0 I have noticed that it's failing with this error, even when I don't use PubKey method, but using manual, entering the correct password:

[bash]$ scp -r ./get_metadata.js [email protected]:/home/root/
[email protected]'s password:
scp: Received message too long 1751477356
scp: Ensure the remote shell produces no output for non-interactive sessions.
#

What might be the problem here?

rare echo
#

Try using the -T flag with your SCP command to disable pseudo-terminal allocation:

scp -T -r ./get_metadata.js [email protected]:/home/root/
trail berry
#

Hi! Thank you for the prompt response! Checking your suggestion.

#
[bash]$ scp -T -r ./get_metadata.js [email protected]:/home/root/
[email protected]'s password:
scp: Received message too long 1751477356
scp: Ensure the remote shell produces no output for non-interactive sessions.
#

Same thing, unfortunately, I am 100% sure I've entered the valid password because I have also been able to connect to the RMPP just fine with this command:

ssh [email protected]
rare echo
#

Have you tried sftp?

trail berry
#

yes, also tried sftp from my ForkLift - no connection (

#

It basically keeps on spinning and never asking for the prompt ...

#

All of these methods worked just fine just on the previous RMPP firmware version...It started exactly after I've upgraded to the 3.15.3.0

rare echo
#

Use -v for verbose in scp

trail berry
#

ok, lots of confidential info there 🙂 Let me edit

rare echo
#

No hurries I'm going to be busy for a while

latent belfry
#

I can confirm that I'm able to scp fine on my firmware running 3.15.3.0, can you try run

trail berry
#
[bash playDemo]$ scp -v -T -r ./get_metadata.js [email protected]:/home/root/
Executing: program /usr/bin/ssh host 10.11.99.1, user root, command sftp
OpenSSH_9.7p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/<MY_USER_ID>/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to 10.11.99.1 [10.11.99.1] port 22.
debug1: Connection established.
debug1: identity file /Users/<MY_USER_ID>/.ssh/id_rsa type -1
...
<10 more similar messages with identity files>
...
debug1: Local version string SSH-2.0-OpenSSH_9.7
debug1: kex_exchange_identification: banner line 0: unlocked
debug1: Remote protocol version 2.0, remote software version dropbear_2020.81
debug1: compat_banner: no match: dropbear_2020.81
debug1: Authenticating to 10.11.99.1:22 as 'root'
...
#
<many messages here, related to the different public key tryings.>
<I redacted because in this test I have used the password authentication actually, so I don't see those relevant. Let me know.>
...
debug1: Next authentication method: password
[email protected]'s password:
Authenticated to 10.11.99.1 ([10.11.99.1]:22) using "password".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: Sending environment.
debug1: channel 0: setting env LC_TERMINAL_VERSION = "3.3.11"
debug1: channel 0: setting env LC_CTYPE = "UTF-8"
debug1: channel 0: setting env LC_TERMINAL = "iTerm2"
debug1: Sending subsystem: sftp
scp: Received message too long 1751477356
scp: Ensure the remote shell produces no output for non-interactive sessions.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2268, received 1108 bytes, in 0.1 seconds
Bytes per second: sent 38255.2, received 18689.1
debug1: Exit status 0
#

Hello worked.

cosmic robin
#

debug1: Exit status 0
So it ran successfully?

#

Despite the lines above that say it failed

trail berry
#

Well, not really, because it was kinda this overall:

[bash]$ scp -T -r ./get_metadata.js [email protected]:/home/root/
[email protected]'s password:
scp: Received message too long 1751477356
scp: Ensure the remote shell produces no output for non-interactive sessions.
cosmic robin
#

Have you confirmed that the files don't exist on the device where you sent them?

#

Right, but the exit code was 0, which means it didn't fail

cosmic robin
#

I'd read this as being a warning if the file you copied exists, and matches the expected value

latent belfry
#

Have you changed any configurations on the device?

trail berry
#

Answering one-by-one)

trail berry
# cosmic robin Have you confirmed that the files don't exist on the device where you sent them?
root@<RMPP_HOST>:~# pwd
/home/root
root@<RMPP_HOST>:~# ls -ltra
drwxr-xr-x    4 root     root          4096 Oct 19 13:52 ..
drwxr-xr-x    3 root     root          4096 Oct 19 13:52 .local
drwxr-xr-x    3 root     root          4096 Oct 19 13:52 .journal
drwxr-xr-x    3 root     root          4096 Oct 19 13:52 .cache
drwx------    2 root     root          4096 Oct 19 14:25 .ssh
drwxr-xr-x    4 root     root          4096 Oct 19 18:49 .config
drwxr-xr-x    6 root     root          4096 Oct 20 16:42 node-v22.10.0-linux-arm64
-rw-r--r--    1 root     root           190 Oct 20 20:49 .bashrc
drwxr-xr-x    3 root     root          4096 Oct 22 17:14 .memfault
-rw-------    1 root     root         15324 Oct 23 17:24 .bash_history
-rw-------    1 root     root         22213 Oct 23 17:28 .viminfo
drwxr-xr-x    2 root     root          4096 Oct 23 17:28 .dropbear
drwx------   11 root     root          4096 Oct 23 17:28 .
drwxrwxrwx    3 root     root          4096 Oct 23 17:52 rm_calendar_memo

So, yes, I have confirmed, and the file I wanted to transfer does not exist currently on the RMPP:

[bash test2]$ scp -T -r ./test.log [email protected]:/home/root/
[email protected]'s password:
scp: Received message too long 1751477356
scp: Ensure the remote shell produces no output for non-interactive sessions.
latent belfry
#

I think this is the problem

cosmic robin
#

Quite possibly

latent belfry
#

What modifications have you done on the device?

trail berry
latent belfry
#

Somethings been changed to the SSH service or shell because it shouldn't be outputting twice

trail berry
#

Yes yes yes. Sorry. It's my bad)

latent belfry
#

Okay firstly you could you reboot your device?

trail berry
#

I did modify the .bashrc

latent belfry
#

Ah

#

i'm betting thats it

trail berry
#

To add some my things like

# echo hello
# mount -o remount,rw /
# set -a;. /home/root/rm_calendar_memo/.env;set +a
# export PATH=$PATH:$NODE_ROOT/bin
# nohup /home/root/rm_calendar_memo/periodically_update_suspended_png.sh &
latent belfry
#

Can you print the contents?

trail berry
#

Now it works, after I commented those things I used.

#

Thanks)

latent belfry
#

Try un-comment the lines one by one to see what's messing it up

cosmic robin
#

the nohup would do it

#

It should be behind a check to see if it's an interactive session or not

#

echo hello would also do it

trail berry
#

[resolved] SFTP and SCP does not seem to be working for RMPP with firmware 3.15.3.0

latent belfry
#
# nohup /home/root/rm_calendar_memo/periodically_update_suspended_png.sh &
#

I'd make this a systemd service

#

Instead of putting it in the bashrc file

#
root@imx8mm-ferrari:~# cat /lib/systemd/system/mitm.service
[Unit]
Description=mitmdump service
After=network.target

[Service]
Type=simple
User=root
ExecStart=/home/root/ipx.sh
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

As an example this is my proxy service

trail berry