SSH로 이상한 접근 시도가 계속 들어오는데...

찬스의 이미지

서버를 한대 운영중인데..
SSH로 자꾸 아래와 같은 시도가 들어옵니다..
이럴 경우에는 어케 하는게 좋은가요?

Apr 25 14:43:41 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:43:43 [sshd] Failed password for root from 221.232.153.40 port 51076 ssh2
Apr 25 14:43:47 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:43:49 [sshd] Failed password for root from 221.232.153.40 port 51262 ssh2
Apr 25 14:43:52 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:43:55 [sshd] Failed password for root from 221.232.153.40 port 51390 ssh2
Apr 25 14:43:58 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:44:01 [sshd] Failed password for root from 221.232.153.40 port 51502 ssh2
Apr 25 14:44:04 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:44:06 [sshd] Failed password for root from 221.232.153.40 port 51607 ssh2
Apr 25 14:44:09 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:44:12 [sshd] Failed password for root from 221.232.153.40 port 51730 ssh2
Apr 25 14:44:15 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:44:17 [sshd] Failed password for root from 221.232.153.40 port 51856 ssh2
Apr 25 14:44:20 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:44:22 [sshd] Failed password for root from 221.232.153.40 port 51991 ssh2
Apr 25 14:44:25 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=root
Apr 25 14:44:28 [sshd] Failed password for root from 221.232.153.40 port 52112 ssh2
Apr 25 14:44:31 [sshd(pam_unix)] authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.232.153.40  user=roo

위에는 root로 로긴을 시도하는거지만... 더 찾아보면..
admin이나 nobody등등 스크립트를 이용해서
들어오려는거 같은데..

이럴때 자동으로 차단하는 그럼 프로그램이나 아니면 효과적으로
대처할 수 있는 방법 좀 아시는 분 있으시면 조언 좀 부탁드립니다.

망치의 이미지

route add -host xxx.xxx.xxx.xxx reject 을 이용해서 아이피를 차단해버리시는건 어떤가요;

---------------------------------------
http://www.waitfor.com/
http://www.textmud.com/

랜덤여신의 이미지

제 데스크탑에도 1시간이 멀다하고 찾아옵니다.
그냥 무시하고 있어요... ;)

offree의 이미지

/etc/ssh/sshd_config 에서

AllowUsers
AllowGroups

를 설정해서 접속을 허용하고자 하는 user , group 을 설정해 보시기 바랍니다.

그나마 조금 나은 듯 하네요.

참고로 전 아예 방화벽으로 허용하고자 하는 IP 만 열어놓고 있습니다.

사용자가 바꾸어 나가자!!

= about me =
http://wiki.kldp.org/wiki.php/offree , DeVlog , google talk : offree at gmail.com

stbaram의 이미지

ssh의 서비스 포트를 바꿔보세요.
/etc/ssh/sshd_config에서 포트번호만 바꿔주고
서비스 리스타트하면 간단히.. ^^

익명 사용자의 이미지

위 텍스트는 tcpdump 로 뜬 건가요?

maddie의 이미지

무슨 웜로봇 같은게 계속 건드리는 거더군요.
사실 패스워드가 아주 간단치만 않으면 뚫리지는 않기 때문에 각 계정의 패스워드만 유의하시면 됩니다. 특히 root요. (가만보면 무조건 랜덤으로 패스워드 적용해서 계속 로그인 해보는 것에 불과합니다, 뚫리면 목마 깔고 트래픽 엄청 뿌려댑니다.)

확실한 건 아예 포트번호를 정말 엉뚱하게 바꾸면 됩니다. ssh는 거의 관리자만 쓰니깐 바꿔버리는 것이 낫습니다.

힘없는자의 슬픔

환골탈태의 이미지

SSH brute - force 공격이랍니다.
http://faq.cnihost.com/ProdImg/hwk-cert-sshbruteforce%5B3%5D.pdf

보통 ssh 포트를 22에서 다른 포트로 변경하고

중요한 서버는 특정 아이피에서만 접속이 가능하도록 방화벽에서 설정

하는게 제일 좋지요..

__________________________________________________
모두 다 Hardy로 업그레이드 하고 있습니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.