๋ณธ๋ฌธ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ

"Linux" ํƒœ๊ทธ๋กœ ์—ฐ๊ฒฐ๋œ 2๊ฐœ ๊ฒŒ์‹œ๋ฌผ๊ฐœ์˜ ๊ฒŒ์‹œ๋ฌผ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  ํƒœ๊ทธ ๋ณด๊ธฐ

ยท ์•ฝ 1๋ถ„

sudo: unable to resolve host ์—๋Ÿฌ ํ•ด๊ฒฐ#

์ƒํ™ฉ#

  • sudo ๋ช…๋ น์–ด๊ฐ€ ํ•„์š”ํ•œ ์ƒํ™ฉ์—์„œ sudo: unable to resolve host๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ์ƒํ™ฉ

  • hostname๊ณผ hosts์˜ ์ •๋ณด๊ฐ€ ๋‹ฌ๋ผ์„œ ์ƒ๊ธฐ๋Š” ๋ฌธ์ œ

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•#

  • sudo vi /etc/hosts

    2021-01-16-210113-image-0

  • 127.0.0.1 localhost ๋’ค์— 127.0.1.1 ip-{hostname} ๋ฅผ ์ถ”๊ฐ€

    2021-01-16-210113-image-1


ยท ์•ฝ 1๋ถ„

ssh๋ฅผ ์ด์šฉํ•˜์—ฌ ์›๊ฒฉ ์„œ๋ฒ„์™€ ์–‘๋ฐฉํ–ฅ ํŒŒ์ผ ์ „์†กํ•˜๊ธฐ#

์›๊ฒฉ โ†’ ๋กœ์ปฌ#

scp [์˜ต์…˜] [๊ณ„์ •๋ช…]@[์›๊ฒฉ IP ์ฃผ์†Œ]:[์›๋ณธ ๊ฒฝ๋กœ] [์ „์†ก ๋ฐ›์„ ์œ„์น˜]
scp abc@111.222.333.444:/home/abc/index.html /home/me/

๋กœ์ปฌ โ†’ ์›๊ฒฉ#

scp [์˜ต์…˜] [์›๋ณธ ๊ฒฝ๋กœ ๋ฐ ํŒŒ์ผ] [๊ณ„์ •๋ช…]@[์›๊ฒฉ IP ์ฃผ์†Œ]:[์ „์†กํ•  ๊ฒฝ๋กœ]
scp /home/me/index.html abc@111.222.333.444:/home/abc/