小编Lam*_*mnk的帖子

如何使用 ssh-agent 启用密钥转发?

我使用 oh-my-zsh 中的 ssh-agent 来管理我的 SSH 密钥。到目前为止,一切都很好,我只需要在启动 shell 时为我的私钥输入一次密码短语,并且公钥身份验证效果很好。

然而,问题是密钥转发不起作用。有 2 个服务器 A 和 B,我可以使用公钥登录。当我 ssh 进入 A 然后从那里 ssh 进入 B 时,我必须提供我的密码,这不应该是这种情况。

A 是 CentOS 5.6 机器,B 是 Ubuntu 11.04 机器。我在本地有这个.ssh/config

Host *
    ForwardAgent yes
Run Code Online (Sandbox Code Playgroud)

OpenSSH on A 是 CentOS 提供的标准 openssh 4.3 包。我还在ForwardAgentA 上启用了 ssh 客户端,但转发仍然不起作用。

ssh forwarding public-key ssh-agent

6
推荐指数
1
解决办法
1万
查看次数

Nginx 无权访问具有相同所有权的文件

我刚刚在 Archlinux 机器上安装了 nginx 并遇到了这个问题:

Nginx 被配置为作为"nginx"运行,这是我添加的一个新用户/组,在/etc/nginx/nginx.conf

user nginx nginx;
Run Code Online (Sandbox Code Playgroud)

对于双重检查:

$ ps aux | grep nginx
nginx     9678  0.0  0.5  28472  2856 ?        S    17:37   0:00 nginx: worker process
nginx     9679  0.0  0.5  28472  2856 ?        S    17:37   0:00 nginx: worker process
root     31912  0.0  0.6  28084  3364 ?        Ss   17:24   0:00 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; error_log stderr;
Run Code Online (Sandbox Code Playgroud)

服务器的根目录位于:

    location / {
            root   /home/lamnk/sites/host.com;
            index  index.html index.htm;
    }
Run Code Online (Sandbox Code Playgroud)

并且文件的所有者也设置为nginx

$ …
Run Code Online (Sandbox Code Playgroud)

nginx chmod arch-linux file-permissions http-status-code-403

6
推荐指数
1
解决办法
4万
查看次数

如何在 nftables 中定义端口范围

我想在我的服务器上打开一系列 TCP 端口nftables

通常,在 netfilter/iptables 中我可以这样编写规则

iptables -A INPUT -p tcp 1000:2000 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)

我尝试以同样的方式写/etc/nftables.conf

tcp dport {1000:2000} accept
Run Code Online (Sandbox Code Playgroud)

nft报告

/etc/nftables.conf:24:15-24: Error: mapping outside of map context
     tcp dport {1000:2000} accept
               ^^^^^^^^^^
Run Code Online (Sandbox Code Playgroud)

linux firewall iptables nftables

5
推荐指数
1
解决办法
2万
查看次数