Skip to main content

SSH and SCP

ํ‚ค ์ƒ์„ฑ#

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

ssh agent ์‹คํ–‰#

eval "$(ssh-agent -s)"

ํ‚ค ๋“ฑ๋ก#

ssh-add ~/<ssh path>/<id file>

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

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

SCP#

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

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

scp [options] <source> <target>

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

sudo chmod 700 ~/<ssh path>
sudo chmod 600 ~/<ssh path>/*
Last updated on