ovh/the-bastion

I can't use scp

SmallL-U opened this issue · 1 comments

When I use command scp with internet I get a message "Subsystem request failed on channel 0"
scp with -v (archlinux)

debug1: Sending subsystem: --user root --host 192.168.101.2 --osh scp --scp-cmd sftp
subsystem request failed on channel 0
scp: Connection closed

When I use this command in LAN, I get this (fedora)

debug1: Sending command: --user root --host 192.168.101.2 --osh scp --scp-cmd scp#-v#-r#-f#~/test.txt
>>>Sorry, but even if you have ssh access to root@192.168.101.2:22, you still need to be granted specifically for scp

it connected successfully in LAN,and it couldn't connect in internet
I think it may have something to do with the relevant settings of my system?
my OS is :ArchLinux
how can I solve it?
thanks

Solved:
Secure copy protocol (SCP)

Install, configure and start OpenSSH. It contains the scp utility to transfer files.

More features are available by installing additional packages, for example rsshAUR or scponly described below.
Note: Since OpenSSH 9.0 the scp utility uses the SFTP protocol by default. The -O option must be used to use the legacy SCP protocol.