๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ”’์ •๋ณด๋ณด์•ˆ/์‹œ์Šคํ…œ ๋ณด์•ˆ

์‹œ์Šคํ…œ ๋ณด์•ˆ - SSH root ์›๊ฒฉ ์ ‘์† ์ฐจ๋‹จ ์ •์ฑ… ์„ค์ •(/etc/ssh/sshd_config)

by Janger 2023. 11. 10.
728x90
๋ฐ˜์‘ํ˜•

 

 

SSH root ์›๊ฒฉ ์ ‘์† ์ฐจ๋‹จ ์ •์ฑ… ์„ค์ •(/etc/ssh/sshd_config)

 

๊ธฐ์กด "PermitRootLogin yes"๋ฅผ "PermitRootLogin no"๋กœ ์ˆ˜์ •ํ•œ๋‹ค. 

# vim /etc/ssh/sshd_config

# Authentication
PermitRootLogin no

 

์„ค์ •์ด ์™„๋ฃŒํ•˜์˜€๋‹ค๋ฉด ์„œ๋น„์Šค๋ฅผ ์žฌ์‹œ์ž‘ํ•œ๋‹ค. 

service ssh restart

 

 

์ •์ฑ…์„ ์„ค์ •ํ•˜๊ธฐ ์ด์ „(PermitRootLogin yes)

 

root@kali:~/Desktop# ssh root@localhost
root@localhost's password: 
Linux kali 3.14-kali1-686-pae #1 SMP Debian 3.14.5-1kali1 (2014-06-07) i686

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Nov 10 17:42:20 2023 from localhost
root@kali:~#

์ •์ƒ์ ์œผ๋กœ root ๋กœ๊ทธ์ธ์ด ๋œ๋‹ค. 

 

 

์ •์ฑ…์„ ์„ค์ •ํ•œ ํ›„(PermitRootLogin no)

 

root@kali:~# ssh root@localhost
root@localhost's password: 
Permission denied, please try again.
root@localhost's password: 
Permission denied, please try again.

๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ๋งž๊ฒŒ ์ž…๋ ฅํ•ด๋„ ๊ถŒํ•œ์ด ๊ฑฐ๋ถ€๋˜์—ˆ๋‹ค๊ณ  ๋‚˜์˜จ๋‹ค. 

728x90
๋ฐ˜์‘ํ˜•