SSH and SCP

ํ‚ค ์ƒ์„ฑ

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

ssh agent ์‹คํ–‰

eval "$(ssh-agent -s)"

ํ‚ค ๋“ฑ๋ก

ssh-add ~/.ssh/id_rsa

ํผ๋ธ”๋ฆญ ํ‚ค ์ ‘์†ํ•  ๊ณณ์— ๋“ฑ๋ก

ssh-copy-id -i ~/.ssh/id_rsa.pub <remote>

SCP

source๋ฅผ target์œผ๋กœ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค.

์›๊ฒฉ์ง€์˜ ๊ฒฝ์šฐ \<user>@\<ip>:\<path> ๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.

scp [options] <source> <target>

ํŒŒ์ผ ๊ถŒํ•œ

sudo chmod 700 ~/.ssh
sudo chmod 600 ~/.ssh/*
Last updated on