在 Fedora 22 上,gpg 找不到 gpg-agent:
% gpg-agent --daemon
% gpg -vvv --use-agent --no-tty --decrypt file.gpg
gpg: using character set `utf-8'
:pubkey enc packet: version 3, algo 1, keyid 3060B8F7271AFBAF
data: [4094 bits]
gpg: public key is 271AFBAF
gpg: using subkey 271AFBAF instead of primary key 50EA64D5
gpg: using subkey 271AFBAF instead of primary key 50EA64D5
gpg: gpg-agent is not available in this session
gpg: Sorry, no terminal at all requested - can't get input
Run Code Online (Sandbox Code Playgroud) 实用程序,例如host,dig让您查看与主机名对应的 IP 地址。
还有getent可用于查询/etc/hosts或其他 NSS 数据库的实用程序。
我正在寻找一个方便的标准实用程序(例如在 Debian 中可用),它可以解析主机名,而不管它在哪里定义。
它应该或多或少相当于
ping "$HOST" | head -1 | perl -lne '/\((.*?)\)/ && print $1'
Run Code Online (Sandbox Code Playgroud) 几天一次,我遇到以下问题。我的笔记本电脑(Debian 测试)突然无法使用 TCP 连接到互联网。
以下事情继续正常工作:
但是当我从我的笔记本电脑尝试 TCP 连接时,它们超时(对 SYN 数据包没有响应)。这是一个典型的 curl 输出:
% curl -v google.com
* About to connect() to google.com port 80 (#0)
* Trying 173.194.39.105...
* Connection timed out
* Trying 173.194.39.110...
* Connection timed out
* Trying 173.194.39.97...
* Connection timed out
* Trying 173.194.39.102...
* Timeout
* Trying 173.194.39.98...
* Timeout
* Trying 173.194.39.96...
* Timeout
* Trying 173.194.39.103...
* Timeout
* Trying 173.194.39.99... …Run Code Online (Sandbox Code Playgroud)