ssh stuck at expecting SSH2_MSG_KEX_ECDH_REPLY

前段时间遇到使用了 WireGuard 的 IP SSH 卡在了 SSH2_MSG_KEX_ECDH_REPLY,使用主机对外的IP又能正常登陆。

debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: compression: none
debug1: kex: client->server cipher: [email protected] MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

一番研究之后发现是 MTU 值偏低导致,在不调整 MTU 的情况下,可以更改 KexAlgorithms 或者 MACs 试试。

ssh [email protected] -v -o KexAlgorithms=ecdh-sha2-nistp521
ssh [email protected] -v -o MACs=hmac-sha2-256

-EOF-

macOS 不借助第三方软查看图片是否含有 Alpha 通道

方法一:
Using Preview:
1. Open the image in Preview
2. Click Tools > Show Inspector (or press Cmd + I)
3. Click the “i” tab (Information)
4. Look under “More Info” – it will show color space and bits per component

方法二:
Using Terminal:

-EOF-

PSQL 常用命令

创建新的数据库

创建新的用户

将新数据库的所有权限授予新用户

删除数据库

删除用户

-EOF-

修复 WordPress 的文件读写权限错误

如果在 WordPress Site Health 页面遇到 “Some files are not writable by WordPress”, 可以通过如下的方式解决:
1. 检查 web server 所使用的 user 账号, 比如 nginx:

如上 nginx 所使用的 user 为 www-data.
2. 将 WordPress 的文件 Owner 更改成 web server user, 比如:

重新刷新页面即可。
-EOF-