기존에 잘 동작하던 scp 명령어가 ubuntu 24.04 환경에서는 동작하지 않는 문제가 있어서
확인한 결과 ssh 패키지가 업그레이드 되면서 변경이 있었습니다.
apt changelog openssh-client
openssh (1:9.0p1-1) unstable; urgency=medium
* New upstream release (https://www.openssh.com/releasenotes.html#9.0p1):
- scp(1): Use the SFTP protocol by default (closes: #144579, #204546,
#327019). This changes scp's quoting semantics by no longer performing
wildcard expansion using the remote shell, and (with some server
versions) no longer expanding ~user paths. The -O option is available
to use the old protocol. See NEWS.Debian for more details.
아래와 같이 -O 옵션을 추가해서 실행해야 동작합니다.
scp -O test.txt hckim@192.168.0.200:/homes/user/dir
ref : https://askubuntu.com/questions/1517468/scp-failing-on-24-04