I am trying to move a file from a virtual machine (Ubuntu 18.04) on my local system to a remote server using a very basic
scp command. This issue is present only on one particular server, others work fine so it is not a generic thing.
scp <file name> <user>@<complete_hostname>:~/
But this command does not proceed beyond authentication which is successful.
Same happens when I use FileZilla.
The IT team advised me to use 'WinSCP' which works fine.
scp debug log
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 'user'@'full hostname's password: debug1: Authentication succeeded (password). debug1: channel 0: new [client-session] debug1: Requesting firstname.lastname@example.org debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = C debug1: Sending env LC_ALL = C debug1: Sending command: scp -v -t ~/
There is no progress after this, FileZilla times out after 20 seconds in similar fashion. while WinSCP works fine.
What can cause
scp to hang, as I am using this in some of my scripts, this issue with one particular server has made my scripts unusable on them, this applies to SFTP methods also.
The IT Team advised me to not use the flags
-t while issuing the command as the same shows up on the debug log and is not supported by the remote server. Can these be removed? I did not explicitly issue them with the command.
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 email@example.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/