scp - deptno/deptno.github.io GitHub Wiki
scp
remote <-> local κ°μ νμΌ μ μ‘
scp -r [USER]@[HOST]:/path/to/remote/dir /path/to/local/dir
scp /path/to/local/file [USER]@[HOST]:/path/to/remote/dir
options
-r
recursive, directory 볡μ¬μ μ¬μ©-p
preserve μμ μκ°μ μμ€λ‘ μ μ§μν¨λ€-i
identity file, password λμ key file μ§μ -P
port μ§μ , 22 κ° μλκ²½μ° μ¬μ©νλ€.-
-O
HOST
λ ~/.ssh/config
λ₯Ό μ€μνλ€. λλ¬Έμ ssh-copy-id
λ±μ ν΅ν΄ ν€λ₯Ό μ€μ ν΄ λλ©΄ λΉλ²μμ΄ νΈνκ² λ³΅μ¬κ° κ°λ₯.
error
subsystem request failed on channel 0
scp: Connection closed
scp λͺ λ Ήμ΄κ° μ€ν¨νλλ° μ΄ λλ -O μ΅μ μ μΆκ°ν΄μ μ±κ³΅νλ€.