1. scp?
- 원격 서버에 있는 파일과 폴더를 전송하거나 가져오기 위해 사용하는 명령어
- local → remote, remote → local, remote → remote 로 파일 및 폴더 전송 가능
2. 사용 방법
- scp 명령어는 ssh 프로토콜을 기반으로 작동하므로 ssh로 원격 서버에 접속이 가능해야 함
- ssh 사용 방법 : https://cencydvlper.tistory.com/16
[ssh] Secure SHell
1. ssh?네트워크 상의 다른 컴퓨터에 로그인하여 명령을 실행하고 파일을 전송할 수 있는 프로토콜ssh 클라이언트 설치되어 있어야 함2. 서버 접속 방법If 서버 이름 = pc-1If 서버 ip = 123.123.1
cencydvlper.tistory.com
- local → remote
- If 서버 name = pc-1
- If 서버 ip = 123.123.123.1
- local의 복사할 파일 경로 = /home/cl_name/abc.txt
- server의 복사 파일 생성 경로 = /home/sv_name/
#. In terminal
#. scp [option] <client_path> <server_user_name>@<server_ip>:<server_path>
scp /home/cl_name/abc.txt pc-1@123.123.123.1:/home/sv_name/
- remote → local
#. In terminal
#. scp [option] <server_user_name>@<server_ip>:<server_path> <client path>
scp pc-1@123.123.123.1:/home/sv_name/abc.txt /home/cl_name/
- remote → remote
#. In terminal
#. scp [option] <server-1_user_name>@<server-1_ip>:<server-1_path> <server-2_user_name>@<server-2_ip>:<server-2_path>
scp pc-1@123.123.123.1:/home/sv-1_name/abc.txt pc-2@123.123.123.2:/home/sv-2_name/728x90
반응형
'How to do' 카테고리의 다른 글
| [ROS2] .bashrc alias 설정 (0) | 2025.07.16 |
|---|---|
| [Visual Studio Code] Explorer 폴더 구조 펼쳐 보기 (0) | 2025.03.19 |
| [ssh] Secure SHell (0) | 2025.03.16 |
| [Ubuntu] 부팅 순서 변경 (0) | 2025.03.14 |
| [Ubuntu] .desktop file (0) | 2025.03.14 |