Sending file happily by scp
tput: unknown terminal "unknown"
/DietPi/dietpi/func/dietpi-globals: line 297: ((: lines=(38+6)/ : syntax error: operand expected (error token is "/ ")
tput: unknown terminal "unknown"
\033[K\033[90m[\033[0m\033[32m OK \033[0m\033[90m]\033[0m Root access verified.
Try sending file with scp from host to dietpi
dietpi-bugreport?No.
USB OTG g_ether but don't think this matters
@Furfel
Thanks for your report.
As you are on version 6.7, can you verify, that the calling code for the message/globals is within /root/.bashrc?
. /DietPi/dietpi/func/dietpi-globals
/DietPi/dietpi/login
I will do myself later, but could you try to add [ -z "$PS1" ] && return in front of the DietPi related lines? I had the impression earlier that .bashrc is not only called for interactive terminals.
[ -z "$TERM" ] does not work obviously, as this is already present within globals: https://github.com/Fourdee/DietPi/blob/testing/dietpi/func/dietpi-globals#L30
@Furfel
Which SCP client and example commands used? We can try to replicate.
@MichaIng
Yeah, both login and globals are there, they execute normally when logging via ssh.
@Fourdee
From: OpenSSH_7.4p1 scp client on Raspbian
To: OpenSSH_7.4p1 server on DietPi 6.7
echo "hello world" > helloworld.txt
scp helloworld.txt [email protected]:/home/dietpi
@Furfel
Thanks 👍
root@DietPi:~# echo "hello world" > helloworld.txt
root@DietPi:~# scp helloworld.txt [email protected]:/home/dietpi
The authenticity of host '192.168.0.113 (192.168.0.113)' can't be established.
ECDSA key fingerprint is SHA256:xkbVZ/wCGVnL1MWQZC/S70DZ0DNbt6AKjGe+GkhLtpU.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.113' (ECDSA) to the list of known hosts.
[email protected]'s password:
helloworld.txt 100% 12 11.1KB/s 00:00
#DietPi user
dietpi@DietPi:~$ echo "hello world" > helloworld.txt
dietpi@DietPi:~$ scp helloworld.txt [email protected]:/home/dietpi
The authenticity of host '192.168.0.113 (192.168.0.113)' can't be established.
ECDSA key fingerprint is SHA256:xkbVZ/wCGVnL1MWQZC/S70DZ0DNbt6AKjGe+GkhLtpU.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.113' (ECDSA) to the list of known hosts.
[email protected]'s password:
helloworld.txt 100% 12 24.2KB/s 00:00
Notes,
@Furfel
Any chance you can test current v6.9, to see if the issue is resolved?
dietpi-backup 1G_DEV_1dietpi-backup -1; reboot@Furfel
We just switched to a new login script method that should not be called on non-interactive shells with no terminal ($TERM) available. This new system on testing branch needs testing with all file transfer software but is meant to solve your issue: https://github.com/Fourdee/DietPi/pull/1798
This should be resolved in v6.9 update, i'll mark as closed. Please reopen if required.