V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  fulajickhz  ›  全部回复第 11 页 / 共 12 页
回复总数  236
1 ... 3  4  5  6  7  8  9  10  11  12  
@TakanashiAzusa 我怕大家太长不看....
@billlee 感谢指正,请问禁止 root 通过 ssh 登录这整个流程有问题吗?
2016-04-12 21:28:36 +08:00
回复了 fulajickhz 创建的主题 宽带症候群 打算使用 Vultr 搭建 SS, aria2,一些疑问向大家请教
@raysonx @dot 您好

按照 DO 的[教程],配置 fail2ban( https://web.archive.org/web/20160317082130/https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-centos-6)

jail.conf 默认配置如下:
```
[DEFAULT]

# "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not
# ban a host which matches an address in this list. Several addresses can be
# defined using space separator.
ignoreip = 127.0.0.1

# "bantime" is the number of seconds that a host is banned.
bantime = 3600

# A host is banned if it has generated "maxretry" during the last "findtime"
# seconds.
findtime = 600

# "maxretry" is the number of failures before a host get banned.
maxretry = 3
```
我是动态 IP ,这条 ignoreip = 127.0.0.1 不用改吗?,所以 jail.conf 保持默认即可?

谢谢
@realpg 感谢回复,不过我是 Linux 0 基础,所以还是弄安全点好,不怕一万就怕万一。
前文 1 2

打算使用 Vultr Tokyo, 浙江联通,正在搜集资料 希望大家能给点建议 谢谢

https://v2ex.com/t/267483#;

打算使用 Vultr 搭建 SS , aria2 ,一些疑问向大家请教

https://v2ex.com/t/270028#reply17

---
@realpg 大兄弟有空帮忙看看 谢谢
@realpg 您好 请问各自 SS 的流量统计是如何实现的?
2016-04-12 00:36:42 +08:00
回复了 fulajickhz 创建的主题 宽带症候群 打算使用 Vultr 搭建 SS, aria2,一些疑问向大家请教
我 Linux0 基础,问了很多非专业问题,真是不好意思:)

谢谢各位的回答 @TakanashiAzusa @raysonx @maskerTUI @oojiayu @YUX @Valyrian @zwpaper @zhangyi2099

非常抱歉 第 7 条 违反了 TOS

我的目的是要禁止 root 账户登录,和密码登录,装 SS(配置多端口), Finalspeed 和 fail2ban, 最终实现用 SSH-key 登录。

禁止 root 账户登录和 SSH-key 登录仍有些疑问。

本地 mac 开 2 个 terminal , terminal_1 用作登陆 VPS , terminal_2 来配置 SSH-key

terminal_1

VPS 端

进入 terminal

输入 ssh root@ip_address #登陆 VPS 的 ROOT 账户

adduser A #添加用户 A


terminal_2

本地 mac 端

ssh-keygen -t rsa #创建密钥

Generating public/private rsa key pair.

Enter file in which to save the key (/user/.ssh/id_rsa):

Created directory '/user/.ssh '
Enter passphrase (empty for no passphrase):
#回车

Enter same passphrase again: #回车
Your identification has been saved in /user/.ssh /id_rsa. #私钥
Your public key has been saved in /user/.ssh /id_rsa.pub. #公钥
The key fingerprint is:
05:71:53:92:96:ba:53:20:55:15:7e:5d:59:85:32:e4 root@test
The key's randomart image is:
+--[ RSA 2048]----+
| o o .. |
| . o oo.+ . |
| o.+... = |
| ...o |
| o S |
| . |
| |
| |
| |
+--------------------+

ssh-copy-id A@IP_address #公钥拷贝到 A 中,所以现在本地有私钥和公钥, VPS 的 A 上有公钥

terminal_1

vps 端

vi /etc/ssh/sshd_config 或 sudo nano /etc/ssh/sshd_config #我本机找不到 /etc/ssh ,所以猜测是到 VPS 上配置

找到#PermitRootLogin #PasswordAuthentication #AuthorizedKeysFile .ssh/authorized_keys 把 yes 改为 no ,注释掉#, 这样 root 无法登陆, root 和 A 都无法用密码登录

修改端口 改为 Port 123456

:wq #保存并退出

/etc/ssh/sshd restart #重启

iptables -I INPUT -p tcp --dport 123456 -j ACCEPT

service iptables save

service iptables restart


本地 mac

复制一个私钥的 txt 文件,命名为 deployment_key.txt ,内有私钥

terminal_2

ssh -i /路径 /deployment_key.txt A@IP_address #通过 SSH key 登录了 VPS 的账户 A

到这里是否已经实现禁止 root 账户登录,密码登录只能用 SSH-key 登录?
2016-04-10 21:02:23 +08:00
回复了 tonyliangli 创建的主题 宽带症候群 VULTR 国内视频网站特别慢
@ershiwo 您好,能说说 vultr 东京的机房有什么问题吗,最近想试试它的 vps ,谢谢
还有这个 20 刀是无限制优惠碼: NGINX20 是怎么得到的?
您好,
1 、问一下 20 刀是无限制优惠碼: NGINX20 的有效期有多久?
2 、如果我新手开了 50$+20$,他前 2 个月扣钱是扣 50$还是 20$的?
2016-04-08 08:40:57 +08:00
回复了 20140930 创建的主题 VPS vultr 的日本节点你们那边延迟多少?
@20140930 除了那个 60 天 50$ 请问还有 12 刀是哪个活动
2016-04-07 21:35:24 +08:00
回复了 fulajickhz 创建的主题 问与答 有人用浦发银行的网银吗?
@alect 有装一个这个 iSecuritySPDBANK 浦发银行安全控件.apk 之后重启 safari 无效
2016-04-07 19:14:20 +08:00
回复了 fulajickhz 创建的主题 问与答 有人用浦发银行的网银吗?
@lisonfan 你不是用 U - key 登陆的吧?
2016-04-07 18:37:26 +08:00
回复了 fulajickhz 创建的主题 问与答 有人用浦发银行的网银吗?
os x 10.10.5
2016-04-06 22:50:18 +08:00
回复了 fulajickhz 创建的主题 问与答 youtube-dl 无法用 socket 5 代理 那该怎么使用?
最后通过 proxychains4 youtube-dl --external-downloader aria2c URL 实现 感谢 @mortal
2016-04-06 21:14:49 +08:00
回复了 fulajickhz 创建的主题 问与答 youtube-dl 无法用 socket 5 代理 那该怎么使用?
@Bryan0Z OS : OS X 10.11
2016-04-06 20:30:50 +08:00
回复了 fulajickhz 创建的主题 问与答 youtube-dl 无法用 socket 5 代理 那该怎么使用?
@gimp 你好 不知道为什么 这么慢 427.74KiB/s 10M 的网 走 SS 因为高峰吗?
2016-04-06 20:17:31 +08:00
回复了 fulajickhz 创建的主题 问与答 youtube-dl 无法用 socket 5 代理 那该怎么使用?
Open the file /usr/local/Library/ENV/4.3/xcrun

Change the first line from: #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0 to #!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0

Save and exit xcrun
2016-04-06 20:15:41 +08:00
回复了 fulajickhz 创建的主题 问与答 youtube-dl 无法用 socket 5 代理 那该怎么使用?
解决了
Open the file brew.rb using the following command: vi /usr/local/Library/brew.rb

Change the first line from: #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0 to #!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0

Save and exit brew.rb
2016-04-06 20:08:22 +08:00
回复了 fulajickhz 创建的主题 问与答 youtube-dl 无法用 socket 5 代理 那该怎么使用?
安装报错
brew install proxychains-ng

/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
1 ... 3  4  5  6  7  8  9  10  11  12  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1542 人在线   最高记录 6547   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms · UTC 17:02 · PVG 01:02 · LAX 10:02 · JFK 13:02
Developed with CodeLauncher
♥ Do have faith in what you're doing.