落絮飞雁

顺流而下,把梦做完

Docker Container Restarting after SSH Login – Solution

As mentioned in a previous blog post, my current project is deployed using Docker. However, during a recent login to the server, a strange phenomenon occurred: all the containers in Docker would restart from time to time. Also, every time I logged in to check the Docker status, it would show that the containers had just started (Up 15 seconds). After several investigations, I finally identified that the restart issue was related to SSH login. Every time I logged in via SSH, the containers would restart.

READ MORE →

Using Docker Compose to Self-host Project Deploy

After three months of hard work, the SSL certificate of my RSS aggregator finally expired. The auto-renew script failed to renew it — this happened a couple of times, I need to login into the web panel and renew it manually every three months. Unfortunately, the web panel malfunctioned this time either. After an epic battle with cert-bot, Nginx, and even the web panel I used, I finally gave up and decided to switch to another self-hosting solution.  

READ MORE →

走下神坛的云主机们

本月开始,日本云主机厂商IDCF就终止对个人用户的服务了。搞笑的是,我是在它停止服务之后才收到的通知。

READ MORE →

Use API to monitor IDCF data transfer usage

IDCF is a large enterprise which provides VPS service at an affordable price in Japan. It provides 3TB data transfer for free each month, Extra transfer fee should be paid after exceed the free plan. So it’s a wise choice to balance the data transfer from the different zone.

READ MORE →

香港NAT云主机使用体验

某天下午被安利了一款云主机:1核心、256MB内存,虽然看起来配置很低,但只要50港币一年,胜在便宜,而且还是香港的。我犹豫了一会儿,决定要买的时候,发现这货售罄了……

READ MORE →

弃用Inoreader,迁移至自建RSS

Inoreader是我常用的RSS阅读器,但是广告越来越多了……

READ MORE →

Try IDCF cost simulation and get a coupon

IDCF recently announced cost simulations function. Which means you only need to speak out the demand, IDCF will automatically recommend the appropriate VPS for you and give a price list. That sounds cool but more important, IDCF will give you a ¥1000 JPY coupon as a reward of this promotion. READ MORE →

VPS建站的安全措施

提高网站安全性,避免站点被黑。
READ MORE →

普通用户如何设置SSH密钥访问

普通用户建立SSH密钥实现无密码登陆

VPS操作中更加推荐使用普通用户登录SSH(避免root远程登陆),但直接设置会造成权限问题(尤其是之前配置过root用户使用密钥认证)。本文简单介绍普通用户配置SSH密钥访问的方法,具体原理请参加末尾参考部分。


 

首先建立普通用户并设置密码(推荐使用密码生成工具生成高强度密码)

建立用户

useradd lxfy

生成密码

passwd lxfy

随后在root身份下创立普通用户ssh文件夹

mkdir -m 777 /home/lxfy/.ssh

切换回普通用户,并生成公钥私钥。
略~
导入公钥到authorized_keys

cat id_rsa.pub > authorized_keys

修改权限

chmod 600 ~/.ssh/authorized_keys

删除公钥私钥

rm -rf id_rsa.pub
rm -rf id_rsa

重启SSH服务即可~

参考文章:
普通用户如何设置SSH无密码访问
SSH keys (简体中文) Archwiki

写写VPS上搭建WordPress的注意事项

最近把网站搬到了阿里云。 READ MORE →