在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
  • 阅读 ( 155 )
  • 分类:互联网

你可能感兴趣的文章

用堡垒主机保护您的网络只需3个步骤

... 安装SSH后,请确保将SSH服务器设置为使用密钥而不是密码进行身份验证。确保您的堡垒主机的IP与上面的端口转发规则中设置的IP相同。 ...

  • 发布于 2021-03-12 01:44
  • 阅读 ( 339 )

你的树莓皮安全吗?

...。这并不是说传统的恶意软件永远不会被使用——在Pi上运行的软件可能会受到攻击,而且该设备可能会被用作僵尸网络的一部分。 ...

  • 发布于 2021-03-13 03:37
  • 阅读 ( 224 )

在linux上保护隐私的10大技巧

“我不会因为运行Linux而感染病毒!” ...

  • 发布于 2021-03-13 08:16
  • 阅读 ( 430 )

树莓皮:非官方教程

... 您一定听说过树莓Pi:掌上型电脑,拥有足够的动力运行服务器或媒体中心,并配有复古游戏;具有控制安全系统和爱好者项目的连接;以及使用软件工具鼓励编程的教学和理解。 ...

  • 发布于 2021-03-13 15:59
  • 阅读 ( 289 )

ssh和vpn的区别是什么?哪个更安全?

...通过向任何人**VPN接入来赚钱。他们经常在许多国家建立服务器。人们被吸引到这些服务是因为各种各样的原因,这些原因与连接到雇主的基础设施无关。 ...

  • 发布于 2021-03-14 04:40
  • 阅读 ( 414 )

如何用ssh远程管理linux服务器

服务器管理仍然是一项必要的任务,有时也很麻烦。使用远程服务器或无头服务器尤其困难。谢天谢地,有了安全Shell(SSH)。secureshell是一种网络协议,允许网络服务在不安全的网络上运行。 ...

  • 发布于 2021-03-15 17:05
  • 阅读 ( 497 )

哪种文件传输方法最适合您的家庭网络?

当您创建自己的文件服务器或网络连接存储时,您可能会惊讶地发现,您需要花多少心思来移动文件。 ...

  • 发布于 2021-03-19 07:34
  • 阅读 ( 299 )

顶级即时消息服务如何使用端到端加密

... Telegram可以访问存储在其云上备份的服务器上的消息。一些人认为,如果网络犯罪分子试图从应用程序中窃取消息传递数据,这会带来额外的攻击向量,可能导致个人数据遭到破坏。 ...

  • 发布于 2021-03-26 16:16
  • 阅读 ( 310 )

2020年是linux恶意软件大流行的一年吗?

...业秘密、知识产权和人事信息等有价值数据的门户。Linux服务器也可以作为一个中转站,用于感染更广泛的网络,其中充斥着Windows、macOS和Android设备。 ...

  • 发布于 2021-03-29 07:01
  • 阅读 ( 308 )

保护ssh服务器的最佳方法

...能很复杂。这里有十个简单的快速胜利来帮助保护您的SSH服务器。 ssh安全基础 SSH代表Secure Shell。“SSH”这个名称可以互换地表示SSH协议本身或允许系统管理员和用户使用该协议与远程计算机进行安全连接的软件工具。 SSH协议...

  • 发布于 2021-04-03 01:55
  • 阅读 ( 348 )
违哈心
违哈心

0 篇文章

相关推荐