[WSL] ssh: connect to host localhost port 22: Connection refused
ยท
๐Ÿ›ข๏ธ Database
์˜ค๋žœ๋งŒ์— WSL์— systemd ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•˜๋‹ค๊ณ  ํ•ด ์—…๋ฐ์ดํŠธ ํ–ˆ๋”๋‹ˆ ssh ์„ค์ •์ด ๊ผฌ์—ฌ๋ฒ„๋ ธ๋‹ค. ๊ธฐ์กด์— ์‚ฌ์šฉํ•˜๋Š” Port๊ฐ€ ๋ฌธ์ œ์ธ์ง€ ํ™•์ธํ•ด๋ณด๋‹ˆ ssh ์ ‘์†์‹œ Password, Key๋กœ๋งŒ ์ ‘์†์ด ๊ฐ€๋Šฅํ•˜๊ฒŒ ๋˜์–ด ์žˆ์—ˆ๋‹ค. https://learn.microsoft.com/ko-kr/windows/wsl/systemd Systemd๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ WSL๋กœ Linux ์„œ๋น„์Šค ๊ด€๋ฆฌ Systemd๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Linux์šฉ Windows ํ•˜์œ„ ์‹œ์Šคํ…œ์„ ์‚ฌ์šฉํ•˜์—ฌ Linux ์„œ๋น„์Šค๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ด…๋‹ˆ๋‹ค. learn.microsoft.com Sol) 1) authorized_keys์— ๋กœ์ปฌ ์„œ๋ฒ„ ์ ‘์† ์ •๋ณด๊ฐ€ ๋“ฑ๋ก๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•ด๋ณธ๋‹ค. ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa cat ~/...
๋‹คํ–ˆ๋‹ค
'connection' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก