在ssh背後執行受保護的家庭伺服器有多大風險?

當您需要在家庭網路上向更大的網際網路開啟某些東西時,SSH隧道是一種足夠安全的方法嗎?...

在ssh背後執行受保護的家庭伺服器有多大風險?

當您需要在家庭網路上向更大的網際網路開啟某些東西時,SSH隧道是一種足夠安全的方法嗎?

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

問題

超級使用者讀者Alfred M.想知道他在連線安全方面的做法是否正確:

I have recently set up a **all server with a low end computer running debian with the aim to use it as a personal git repository. I have enabled ssh and was quite surprised at the promptness at which it suffered from brute force attacks and the like. Then I read that this is quite common and learned about basic security measures to ward off these attacks (lots of questi*** and duplicates on serverfault deal with it, see for instance this one or this one).

But now I am wondering if all this is worth the effort. I decided to set up my own server mostly for fun : I could just rely on third party soluti*** such as those offered by gitbucket.org, bettercodes.org, etc. While part of the fun is about learning about Internet security, I have not enough time to dedicate to it to become an expert and be almost certain that I took the correct prevention measures.

In order to decide if I will continue to play with this toy project, I would like to know what I really risk in doing so. For instance, in what extent are the other computers connected to my network threaten as well? Some of these computer are used by people with even lesser knowledge than mine running Windows.

What is the probability that I get into real trouble if I follow basic guidelines such as strong password, disabled root access for ssh, non standard port for ssh and possibly disabling password login and using one of fail2ban, denyhosts or iptables rules?

Put another way, is there some big bad wolves I should fear or is it all mostly about shooing away script kiddies?

阿爾弗雷德應該堅持第三方解決方案,還是他的DIY解決方案是安全的?

答案

超級使用者撰稿人菲德勒溫向阿爾弗雷德保證,這是非常安全的:

IMO SSH is one of the safest things to have listen on the open internet. If you’re really concerned have it listen on a non-standard high end port. I’d still have a (device level) firewall between your box and the actual Internet and just use port forwarding for SSH but that’s a precaution against other services. SSH itself is pretty damn solid.

I have had people hit my home SSH server occasionally (open to Time Warner Cable). Never had an actual impact.

另一位撰稿人Stephane強調了進一步保護SSH是多麼容易:

Setting up a public key authentication system with SSH is really trivial and takes about 5 minutes to setup.

If you force all SSH connection to use it, then it’ll make your system pretty much as resilient as you can hope to without investing a LOT into security infrastructure. Frankly, it’s so simple and effective (as long as you don’t have 200 accounts – then it gets messy) that not using it should be a public offense.

最後,Craig Watson提供了另一個最小化入侵嘗試的技巧:

I also run a personal git server that’s open to the world on SSH, and I also have the same brute-force issues as you, so I can sympathise with your situation.

TheFiddlerWins has already addresses the main security implicati*** of having SSH open on a publicly-accessible IP, but best tool IMO in resp***e to brute-force attempts is Fail2Ban – software that monitors your authentication log files, detects intrusion attempts and adds firewall rules to the machine’s localiptables firewall. You can configure both how many attempts before a ban and also the length of the ban (my default is 10 days).


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-11 13:56
  • 閱讀 ( 35 )
  • 分類:網際網路

你可能感興趣的文章

用堡壘主機保護您的網路只需3個步驟

... 安裝SSH後,請確保將SSH伺服器設定為使用金鑰而不是密碼進行身份驗證。確保您的堡壘主機的IP與上面的埠轉發規則中設定的IP相同。 ...

  • 發佈於 2021-03-12 01:44
  • 閲讀 ( 59 )

livecd的50個酷用法

... 11連線到網路伺服器 ...

  • 發佈於 2021-03-12 09:39
  • 閲讀 ( 52 )

樹莓皮:非官方教程

... 您一定聽說過樹莓Pi:掌上型電腦,擁有足夠的動力執行伺服器或媒體中心,並配有復古遊戲;具有控制安全系統和愛好者專案的連線;以及使用軟體工具鼓勵程式設計的教學和理解。 ...

  • 發佈於 2021-03-13 15:59
  • 閲讀 ( 64 )

12個工具,你可以用來幫助打擊勒索軟體

...以配置為在幾乎任何地方執行,包括您的**,或者在無頭伺服器上執行。 ...

  • 發佈於 2021-03-14 16:51
  • 閲讀 ( 49 )

哪種檔案傳輸方法最適合您的家庭網路?

當您建立自己的檔案伺服器或網路連線儲存時,您可能會驚訝地發現,您需要花多少心思來移動檔案。 ...

  • 發佈於 2021-03-19 07:34
  • 閲讀 ( 56 )

如何對onenote 2016中的筆記進行密碼保護

...OneNote筆記上的標記不包括在筆記標記摘要中。因此,在執行文字或標記搜尋之前,請解鎖要包含在搜尋中的部分。 ...

  • 發佈於 2021-03-24 05:27
  • 閲讀 ( 60 )

什麼是vpn洩漏?如何檢測和預防

... 當你訪問一個網站時,你首先向DNS伺服器傳送一個請求。請求基本上是說“我想去makeuseof.com網站,IP地址是多少?”(儘管DNS可以做的遠不止這些)。DNS伺服器用一個IP地址響應,您的瀏覽器建立連線。 ...

  • 發佈於 2021-03-25 00:48
  • 閲讀 ( 75 )

ssh是什麼?它代表什麼?

... SSH使用上述兩種加密型別在客戶機-伺服器模型中建立安全連線。當客戶機試圖建立與伺服器的連線時,每一方都會通訊其加密協議。 ...

  • 發佈於 2021-03-28 08:50
  • 閲讀 ( 55 )

2020年是linux惡意軟體大流行的一年嗎?

...祕密、智慧財產權和人事資訊等有價值資料的門戶。Linux伺服器也可以作為一箇中轉站,用於感染更廣泛的網路,其中充斥著Windows、macOS和Android裝置。 ...

  • 發佈於 2021-03-29 07:01
  • 閲讀 ( 59 )

保護ssh伺服器的最佳方法

...能很複雜。這裡有十個簡單的快速勝利來幫助保護您的SSH伺服器。 ssh安全基礎 SSH代表Secure Shell。“SSH”這個名稱可以互換地表示SSH協議本身或允許系統管理員和使用者使用該協議與遠端計算機進行安全連線的軟體工具。 SSH協...

  • 發佈於 2021-04-03 01:55
  • 閲讀 ( 46 )
違哈心
違哈心

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦