๐์ ๋ณด๋ณด์/์์คํ
๋ณด์
์์คํ ๋ณด์ - SSH root ์๊ฒฉ ์ ์ ์ฐจ๋จ ์ ์ฑ ์ค์ (/etc/ssh/sshd_config)
Janger
2023. 11. 10. 17:50
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