Using Certificates to Authenticate Linux Remote Login

Most people use passwords to log into a Linux shell remotely. Not only is it tedious, but if you use the same password everywhere and encounter an incident like the CSDN 6 million password leak, your VPS is essentially compromised. Therefore, we can replace passwords with a more convenient and secure method: RSA-encrypted certificate files. First, we need to generate a certificate. cd ~/.ssh ssh-keygen -t rsa At this point, your .ssh directory should contain two new files: id_rsa.pub and id_rsa . The latter is your private key—keep it secure—while the former is your public key, which can be shared publicly. Next, we'll configure our VPS. Upload your id_rsa.pub to the server's ~/.ssh directory using FileZilla or WinSCP, and rename it to authorized_keys ....

The Proper Usage of Caching Plugins

While visiting Blog @ Mr.Ducky today, I noticed the navigation bar showed 4 items on the homepage but 6 items on subpages. After checking with the owner, it turned out to be a caching issue... Caching plugin bugs can cause significant problems. Therefore, it's crucial to understand how to use caching plugins correctly. When publishing a new post, your website's homepage should update automatically. However, if a caching plugin is active, it may continue serving the old cached version, preventing visitors from seeing the latest content. Always clear your cache promptly after updates. Plugins like W3TC and WP Super Cache support automatic cache clearing. After modifying your website template, always clear the cache immediately....

Why Hong Kong CDN Can Be Slower Than US CDN

CDN, or Content Delivery Network, creates distributed copies of your website across multiple locations. These copies store static resources like JS, CSS, and images, accelerating access for visitors. Sometimes CDNs can also optimize network paths between regions. For example, if your website is hosted in Location B , and you (and your visitors) are in Location A , the connection between A and B might pass through Location C with poor network quality. When you ping your site, packet loss occurs at C, forcing clients to wait and retransmit data, slowing down the site. By using a CDN in Location D , traffic bypasses the problematic C, reducing packet loss and improving speed. A autoTranslated: true --- - > C ( X )...

Removing W3 Total Cache Footer Comment

The resource minification effect of W3 Total Cache is excellent - it even minifies HTML. Just look at my webpage source code: line breaks are removed, and the minification is extremely effective. However, at the end of the page, there's an added comment by W3 Total Cache: <! -- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/ Minified using disk: basic Content Delivery Network via lantian.pub Served from: lantian.pub @ 2013-02-13 20:56:59 by W3 Total Cache -- > For someone like me who pursues speed, this not only unnecessarily increases the webpage size but, more importantly, it annoys me whenever I see it. Therefore, I decided to tackle W3 Total Cache and remove the code that generates this comment....

Installing VMware Workstation 9 on Ubuntu

The VirtualBox in Ubuntu's software repositories is becoming increasingly unreliable. Previously, it could at least be installed, but now it fails even to install. The version from the official source works, but it pulls down a massive bundle of KDE components—by the time VirtualBox finishes installing, KDE is practically installed too. So I decided to try VMware instead. Download address: http://download.pchome.net/system/sysenhance/download-10771.html The downloaded file has a .bundle extension, which is VMware's installer. However, you can't run it directly—we first need to grant it execute permissions: chmod +x VMware-Workstation-Full-9.0.0-812388.i386.bundle sudo ./VMware-Workstation-Full-9.0.0-812388.i386.bundle Remember to adjust the filename accordingly....

Host1Free VPS Memory Usage Optimization

PS: After publishing the article for the first time, I realized I forgot to configure the connection between nginx and php5-fpm. When I tried to connect to my VPS to check the settings, I opened the terminal, pressed the up arrow and Enter, only to discover my last command was "exit"... PS2: Folks using port 22 on VPS should be cautious – you might get disconnected mid-command. Switch to another port like 2222. (So 2-ish) PS3: Today I set up a Debian 6 test environment on VirtualBox and discovered Lighttpd has plugin functionality... Revised accordingly. For a VPS, resources like CPU and disk space are usually sufficient for running a personal blog like mine. The real headache is insufficient memory....

Host1Free Checks If All Users Are Using Their VPS

Host1Free's free VPS campaign has been running for quite some time. They've deployed over 30 servers, allocating a total of 30,000 VPS instances (severe overselling... but it's free, so we have to bear with it). This attracted a massive number of user registrations, and most importantly, the official service doesn't discriminate against users from China. However, Chinese users have a characteristic: after getting the VPS, they play around with it until they get bored, then abandon it. Or if they obtain other VPS services (like EC2 or VPS.me, which was available months ago), they stop using it entirely. But Host1Free is quite diligent overall – whenever a server goes down, they restart all VPS instances. Consequently, those unused VPSes, each with 128MB RAM + 640MB Swap, waste resources....

Enabling SSL Encryption for nginx

One advantage of using your own VPS is the ability to enable SSL encryption, which ensures secure blog management in public spaces and reduces the likelihood of connection interruptions due to environmental factors. The nginx package in Debian 6's software repository comes with the SSL module pre-installed, making SSL setup straightforward. Simply duplicate /etc/nginx/sites-available/default as default-ssl and apply the following modifications: server { listen 443 ; server_name localhost; ssl on ; ssl_certificate lic.crt; ssl_certificate_key lic.key; } or (modify default directly as shown below): server { listen 80 ; listen 443 ssl; server_name localhost; ssl_certificate lic.crt; ssl_certificate_key lic.key; } Remember to replace lic.crt and lic.key with your actual certificate paths....

Solution for SCIM Malfunction

On Ubuntu 12.10, I dislike using the default ibus. Neither fcitx nor scim in the software repositories include a Pinyin package, so I downloaded the Google Pinyin module for scim, compiled and installed it myself. However, during use, scim frequently malfunctions. The symptom is that no matter which input field I click, scim fails to recognize it and thinks Chinese input isn't possible there. This forces me to type in English. During one such malfunction, I was chatting with a classmate via pywebqq. When scim crashed, the subsequent conversation was conducted entirely in Pinyin. It wasn't until the other party stopped responding that I took the chance to log out and log back in, restoring scim. Today, while writing an essay on my computer, scim malfunctioned again....

XJOI Indexed by Multiple Search Engines

Recently, feeling bored, I searched for XJOI on Bing, and... it actually showed up in the results... http://cn.bing.com/search?q=www.hzxjhs.com%3A83&go=&qs=n&form=QBLH&pq=www.hzxjhs.com%3A83&sc=0-3&sp=-1&sk= http://cn.bing.com/search?q=%2Bxjoi&go=&qs=n&form=QBRE&pq=%2Bxjoi&sc=0-0&sp=-1&sk= Then I immediately wondered: if Bing indexed it, would Yahoo? And sure enough... it was indexed... http://search.yahoo.com/search;_ylt=A2KLf7U8vblQtAIASlKbvZx4?p=XJOI&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-701 http://search.yahoo.com/search;_ylt=A0oGdUdIvblQiAMAUcRXNyoA?p=www.hzxjhs.com%3A83&fr2=sb-top&fr=yfp-t-701&type_param= Then Tencent Soso: http://www.soso.com/q?pid=s.idx&cid=s.idx....