SCP 在文件传输开始前挂起

Aru*_*mar 5 file-sharing file-transfer scp

我正在尝试使用非常基本的 scp 命令将文件从本地系统上的虚拟机(Ubuntu 18.04)移动到远程服务器。此问题仅存在于一台特定服务器上,其他服务器工作正常,因此这不是一个普遍问题。

scp <file name> <user>@<complete_hostname>:~/
Run Code Online (Sandbox Code Playgroud)

但此命令不会在身份验证成功后继续进行。

SCP Log: (from local machine, Ubuntu 18.04)
==========
debug1: Next authentication method: publickey
debug1: Offering public key: 
RSA SHA256:<key> /home/username/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279 
debug1: Authentication succeeded (publickey).
Authenticated to 'HOSTNAME' ([10.6.26.145]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_IN
debug1: Sending command: scp -v -r -d -t ~/received/


Form another  remote server:
debug1: Next authentication method: publickey
debug1: Trying private key: /home/username/.ssh/identity
debug1: Offering public key: /home/username/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /home/username/.ssh/id_dsa
debug1: Trying private key: /home/username/.ssh/id_ecdsa
debug1: Next authentication method: password
username@hostname's password: 
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = C
debug1: Sending env LC_ALL = C
debug1: Sending command: scp -v -t ~/
Run Code Online (Sandbox Code Playgroud)

我对这些机器没有任何特权访问权限,有没有办法找出问题所在?我需要做同样的事情吗?

Aru*_*mar 0

事实证明这是防火墙阻止了传输。原因是我的默认 shell 的.*rc文件的文件权限。

我的默认 shell 是 csh,文件权限是

-rwxr-s---
Run Code Online (Sandbox Code Playgroud)

将这些更改为

-rw-r-----
Run Code Online (Sandbox Code Playgroud)

解决了这个问题。