Logo Ricky
  • Home
  • About
  • More
    Skills Experiences Education Projects
  • Posts
  • Notes
  • Activities
  • Transform
  • English
    English Chinese
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Tags
  • A10
  • ACME
  • AD
  • AES
  • AI
  • Aliyun
  • Ansible
  • APP
  • Application Delivery Controller
  • Arceus
  • Argo CD
  • ASCII
  • Authentication
  • Authorization
  • AWS
  • BASH
  • Bayonet
  • Benchmark
  • BGP
  • BIRD
  • Board Game
  • Browser
  • Byte
  • Cache
  • CDN
  • Channel
  • Chart
  • Checklist
  • Chrome
  • Chrome OS
  • Chrony
  • CI
  • Cilium
  • Cisco
  • Cloud-Native
  • Cloudflare
  • Cluster
  • Command Line
  • Completion
  • Config
  • Container
  • CPU
  • CURL
  • Data
  • Database
  • Debug
  • Dehydrated
  • Design
  • DevSecOps
  • Diagrams
  • Dmg
  • DNS
  • DNS-01
  • Docker
  • EFF
  • ElasticSearch
  • ELK
  • Emoji
  • EMQX
  • Encode
  • Encrypt
  • ESXi
  • Extension
  • Firewall
  • Fortigate
  • Fortinet
  • FortiOS
  • Game
  • GeoIP
  • GIN
  • Git
  • GitBook
  • Github
  • Gitlab
  • GitOps
  • Gluetun
  • Go
  • Go-Mysql-Elasticsearch
  • Golang
  • Google
  • GPG
  • GraphQL
  • HA
  • HAProxy
  • Hash
  • HomeLab
  • Htop
  • HTTP
  • Infra
  • Infrastructure
  • Input Method
  • Interview
  • Introduction
  • IPhone
  • Iptables
  • Iso
  • Issue
  • ITerm2
  • Jenkins
  • Jsoniter
  • Juniper
  • JWT
  • Kibana
  • Kubernetes
  • LDAP
  • Leetcode
  • Lightweight
  • Linkerd
  • Links
  • Linux
  • Llamafile
  • LLM
  • Log
  • Lua
  • Lullaby
  • LVM
  • Machinelearning
  • MacOS
  • Markdown
  • Mattermost
  • Mermaid
  • MinIO
  • Module
  • MQTT
  • MSS
  • MTU
  • Music
  • MyDumper
  • MySQL
  • NAS
  • Netcat
  • Network
  • Nftables
  • Nginx
  • OAuth
  • OIDC
  • Ollama
  • OpenResty
  • Parquet
  • Percona
  • Pinyin
  • Pip
  • Plugin
  • Pokemon
  • PostgreSQL
  • PowerDNS
  • PowerShell
  • Pprof
  • Principle
  • Prometheus
  • Protobuf
  • Proxy
  • Push
  • Python
  • QRCode
  • R
  • RAID
  • RDP
  • Redis
  • Regex
  • Ringtone
  • Route
  • Rust
  • S3
  • ScreenShot
  • Security
  • Selenium
  • Sentry
  • Service Mesh
  • SFTP
  • SHELL
  • Slides
  • Snow
  • Software
  • SonarQube
  • SQL
  • SSH
  • SSL
  • String
  • Switch
  • Sync
  • Synology
  • System
  • Tcpdump
  • Telegram
  • Terminal
  • Terraform
  • Test
  • Testing
  • Time
  • Timeout
  • TLS
  • Tor
  • Trace
  • Traefik
  • Travel
  • Tunnel
  • Typora
  • Ubuntu
  • URL
  • UserAgent
  • V2Ray
  • Vagrant
  • Video
  • Vim
  • Virtualization
  • Visualization
  • VNC
  • VPN
  • VSCode
  • WAF
  • Web
  • WebAssembly
  • Webp
  • Windows
  • WSL
  • YAML
  • Youtube
  • Zabbix
  • Zero Trust
  • Zim
  • ZSH
  • 台語
Hero Image
Configuring SSH Keys for Multiple GitHub Accounts

Configuring SSH Keys for Multiple GitHub Accounts Use Different Host values Host github.com HostName github.com User git IdentityFile ~/.ssh/id_fry_ed25519 Host github-plnx HostName github.com User git IdentityFile ~/.ssh/id_fry_plnx_ed25519 # Instead of the actual URL $ git clone git@github.com:planet-express/delivery_service.git # Substitue in our custom Host value for the `github.com` part $ git clone git@github-plnx:planet-express/delivery_service.git Automate Substituting the Host [include] path = ~/.gitconfig_custom # See custom `Host github-plnx` in ~/.ssh/config [url "github-plnx:planet-express"] insteadOf = git@github.com:planet-express

Tuesday, February 11, 2025 Read
Hero Image
Add SFTP user and share directory

Add SFTP user and share directory dev_test_user, qa_test_user 同權限 dev_user, qa_user 同權限 1. 建立共享資料夾(SFTP 使用的資料夾) sudo mkdir -p /home/{test,prod}/{exchange,upload} sudo mkdir -p /home/{test,prod}/exchange/success sudo mkdir -p /home/{test,prod}/upload/backup 2. 建立使用者群組 sudo groupadd share01-test sudo groupadd share01-prod 3. 創建 qa_test_user 使用者並設定 qa_test_user 使用者的群組為 share01-test sudo useradd -m -G share01-test qa_test_user # 設定 dev_test_user 使用者的群組為 share01-test sudo usermod -G share01-test dev_test_user # 設定密碼 sudo passwd qa_test_user 4. 創建 qa_user 使用者並設定 qa_user 使用者的群組為 share01-prod sudo useradd -m -G share01-prod qa_user # 設定 dev_user 使用者的群組為 share01-prod sudo usermod -G share01-prod dev_user # 設定密碼 sudo passwd qa_user 5. 設定權限 # 設定 /home/test 資料夾(含下級資料夾)的使用者為 qa_test_user,群組為 share01-test sudo chown -R qa_test_user:share01-test test/ # 設定 /home/prod 資料夾(含下級資料夾)的使用者為 qa_user,群組為 share01-prod sudo chown -R qa_user:share01-prod prod/ # SFTP 登入資料夾權限要給 root sudo chown root:root /home/test sudo chown root:root /home/prod 6. 設定 /etc/ssh/sshd_config /etc/ssh/sshd_config

Thursday, November 30, 2023 Read
Hero Image
Use terminal and SSH to remote host

Use terminal and SSH to remote host 1. Modern Terminals Hyper iTerm2 Tabby Warp Wez’s Terminal WindTerm 2. Open terminal in macOS ⌘ + space open Spotlight search terminal.app press ↩ 3. SSH to remote host ensure the private key file path. enter the command in the terminal: ssh -i /path/to/private_key.pem ubuntu@ubuntu.host.com

Friday, November 24, 2023 Read
Hero Image
Windows SSH Setup

Windows SSH Setup Install OpenSSH for Windows The default shell is cmd. The docs say to change the ansible_shell_type variable if needed. This should be set as a host variable in inventory: ansible_shell_type, with value cmd or powershell. Add the ansible_connection host variable in inventory to indicate SSH connections. (192.168.192.11 ansible_user=Administrator ansible_connection=ssh ansible_shell_type=cmd ) You may need to add remote_tmp in ansible.cfg and set it to C:\TEMP. In playbooks, use modules prefixed with win_, or use the raw module.

Tuesday, January 3, 2023 Read
Hero Image
SSH failing with Error : fatal: daemon() failed: No such device

SSH failing with Error : fatal: daemon() failed: No such device /var/log/secure Oct 10 10:58:05 vps sshd[23799]: fatal: daemon() failed: No such device # rm -vf /dev/null removed `/dev/null` -bash-3.2# mknod /dev/null c 1 3 Started SSH and the SSH started responding: # service sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ] -bash-3.2# service sshd status openssh-daemon (pid 30608) is running…

Thursday, March 4, 2021 Read
Hero Image
New LibSSH Connection Plugin for Ansible Network Replaces Paramiko, Adds FIPS Mode Enablement

New LibSSH Connection Plugin for Ansible Network Replaces Paramiko, Adds FIPS Mode Enablement Switching Ansible Playbooks to use LibSSH # Installing LibSSH pip install ansible-pylibssh Using LibSSH in Ansible Playbooks Method 1. The ssh_type configuration parameter can be set to use libssh in the active ansible.cfg file of your project [persistent_connection] ssh_type = libssh Method 2: Set the ANSIBLE_NETWORK_CLI_SSH_TYPE environment variable $ export ANSIBLE_NETWORK_CLI_SSH_TYPE=libssh Method 3: Set the ansible_network_cli_ssh_type parameter to libssh within your playbook at the play level

Wednesday, November 25, 2020 Read
Hero Image
SSH certificate login guide

SSH certificate login guide Certificate login flow Before using SSH certificate login, you need to generate certificates. The steps are: The user and the server both send their public keys to the CA. The CA uses the server public key to generate a server certificate and sends it to the server. The CA uses the user public key to generate a user certificate and sends it to the user. Once certificates are in place, the user can log in. SSH handles the whole process automatically.

Wednesday, July 8, 2020 Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
Contact me:
  • zeyanlin@outlook.com
  • linzeyan
  • Ricky
  • Ricky