scp在centos和ubuntu这样用都好好的,为啥在openeuler下就不行了呢?

scp root@192.168.0.108:/wu/MyInit.sh .

The authenticity of host ‘192.168.0.108 (192.168.0.108)’ can’t be established.
ED25519 key fingerprint is SHA256:vM7o48SGIy4KSmo6xCCy0kpFibpci+G/i1JiWxNjoF8.
This host key is known by the following other names/addresses:
~/.ssh/known_hosts:8: 192.168.0.105
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ‘192.168.0.108’ (ED25519) to the list of known hosts.

Authorized users only. All activities may be monitored and reported.
root@192.168.0.108’s password:
scp: Received message too long 168449893
scp: Ensure the remote shell produces no output for non-interactive sessions.

解决了。我问了千问。是这样的:

要用scp的主机上执行:mv /etc/profile.d/system-info.sh{,.bak}这样禁用系统登录信息。下面的是执行结果:

19:59:54 [root@fire wu]# scp root@192.168.0.108:/wu/MyInit.sh .

Authorized users only. All activities may be monitored and reported.
MyInit.sh 100% 1871 1.1MB/s 00:00
20:02:38 [root@fire wu]# ll
总计 12
-rwxr-xr-x. 1 root root 366 2月19日 19:53 local9.repo
-rw-r–r–. 1 root root 1871 2月21日 20:02 MyInit.sh