본문 바로가기
운영체제/Linux

Linux ] SFTP로 파일 전송하기

by eteo 2025. 1. 21.

 

 

SFTP는 SSH 기반으로 안전하게 파일을 전송할 수 있는 방법이다. 운영체제와 상관없이 사용할 수 있지만 여기서는 Linux PC에서 사용하는 방법을 소개한다.

 

 

 

SFTP 명령어를 사용하여 상대 장치에 접속한다.

$sftp username@192.168.55.1

 

 

 

Host PC에서 Remote PC로 파일 업로드 하기

sftp>put /path/to/local/file /path/to/remote/destination

 

 

 

Remote PC에서 Host PC로 파일 다운로드 하기

sftp>get /path/to/remote/file /path/to/local/destination

 

 

참고로 디렉토리 전송은 지원하지 않는다.

 

 

SFTP 세션 종료

sftp>bye

 

 

 

snap을 사용해 sftpclient를 설치하면 GUI환경으로 사용할 수 있다.

$sudo apt update
$sudo apt install snapd
$sudo snap install sftpclient
$sftpclient