Errors SCP

nc: invalid option -- 'X'

You are trying to send file via scp

scp file user@192.168.56.117:/home/user/

And get the following error

nc: invalid option -- 'X' Ncat: Try `--help' or man(1) ncat for more information, usage options and help. QUITTING. ssh_exchange_identification: Connection closed by remote host lost connection

It can be confusing, because you are not using netcat

But if you run the same command with vvv options (Verbose) you can see the details

scp -vvv file user@192.168.56.117:/home/user/

Executing: program /usr/bin/ssh host 192.168.56.117, user user, command scp -v -t /home/user/ OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 58: Applying options for * debug1: /etc/ssh/ssh_config line 70: Applying options for * debug1: Executing proxy command: exec nc -X connect -x 192.168.56.103:1080 192.168.56.117 22 debug1: key_load_public: No such file or directory debug1: identity file /home/user/.ssh/bastion_key type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/user/.ssh/bastion_key-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.4 debug1: permanently_drop_suid: 1000 nc: invalid option -- 'X' Ncat: Try `--help' or man(1) ncat for more information, usage options and help. QUITTING. ssh_exchange_identification: Connection closed by remote host lost connection

Share in social media: