Initial commit: SSH config and public keys
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# === 私鑰 — 絕對不可提交 ===
|
||||||
|
id_rsa
|
||||||
|
id_ecdsa
|
||||||
|
ecdsa-key-*
|
||||||
|
google_compute_engine
|
||||||
|
*.pem
|
||||||
|
|
||||||
|
# === 動態 / 暫存檔案 ===
|
||||||
|
known_hosts
|
||||||
|
known_hosts.old
|
||||||
|
google_compute_known_hosts
|
||||||
|
sockets/
|
||||||
|
|
||||||
|
# === 公鑰(選擇性排除,取消註解即可追蹤) ===
|
||||||
|
# *.pub
|
||||||
39
config
Normal file
39
config
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
Include /Users/timmy/.colima/ssh_config
|
||||||
|
Include config.d/*
|
||||||
|
|
||||||
|
# Fig ssh integration. Keep at the bottom of this file.
|
||||||
|
Match all
|
||||||
|
Include ~/.fig/ssh
|
||||||
|
|
||||||
|
Host github.com
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
AddKeysToAgent yes
|
||||||
|
|
||||||
|
# --- Global Settings ---
|
||||||
|
Host *
|
||||||
|
|
||||||
|
# StrictHostKeyChecking no # 不進行 Strict HostKey 檢查
|
||||||
|
# UserKnownHostsFile /dev/null # 不使用 KnownHosts 檔案
|
||||||
|
# —— 連線穩定與正常結束 ——
|
||||||
|
TCPKeepAlive yes # 啟用 TCP KeepAlive 功能
|
||||||
|
ServerAliveInterval 60 # 每 60 秒向伺服器端發送一次請求
|
||||||
|
ServerAliveCountMax 5 # 若伺服器端 5 次無回應則中斷連接
|
||||||
|
ExitOnForwardFailure yes # 若連線轉發失敗立即退出,避免殘留 session
|
||||||
|
|
||||||
|
# —— Multiplexing(加速多連線,減少殘留程序)——
|
||||||
|
ControlMaster auto # 自動使用 ControlMaster 功能
|
||||||
|
ControlPath ~/.ssh/sockets/%r@%h-%p # 設定 ControlPath
|
||||||
|
ControlPersist 5m # 主連線關掉後,socket 最多保留 5 分鐘
|
||||||
|
|
||||||
|
# —— 安全性建議(擇一)——
|
||||||
|
# 預設:保留嚴格檢查(建議)
|
||||||
|
#StrictHostKeyChecking ask
|
||||||
|
# 或想少互動但仍相對安全:
|
||||||
|
#StrictHostKeyChecking accept-new
|
||||||
|
|
||||||
|
# —— 代理/金鑰(依你目前環境)——
|
||||||
|
IdentityAgent /Users/timmy/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
|
||||||
|
|
||||||
|
CheckHostIP no # 不檢查 IP 位址是否變更
|
||||||
|
VisualHostKey no # 不顯示伺服器端的 HostKey
|
||||||
|
|
||||||
41
config.d/acetech
Normal file
41
config.d/acetech
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# --- AceTech Corp. ---
|
||||||
|
|
||||||
|
# AceTech 9F 防火牆
|
||||||
|
Host acetech_9f_fw 192.168.6.1
|
||||||
|
HostName 192.168.6.1
|
||||||
|
User ubuntu
|
||||||
|
ProxyJump 60.251.128.52
|
||||||
|
|
||||||
|
Host 60.251.128.52
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
# AceTech B2B 服務 (內網)
|
||||||
|
Host acetech_b2b_local
|
||||||
|
HostName 192.168.88.36
|
||||||
|
User timmy
|
||||||
|
# 服務:B2B Web(6543), Postgres(5433), Redis(6379)
|
||||||
|
|
||||||
|
# AceTech MantisBT (問題追蹤系統)
|
||||||
|
Host acetech_mantis
|
||||||
|
HostName 192.168.88.91
|
||||||
|
User root
|
||||||
|
|
||||||
|
# AceTech 內網主機自動跳接
|
||||||
|
Host 192.168.6.*
|
||||||
|
User ubuntu
|
||||||
|
ProxyJump acetech_9f
|
||||||
|
|
||||||
|
Host 192.168.88.40
|
||||||
|
User root
|
||||||
|
|
||||||
|
# AceTech 21F 防火牆
|
||||||
|
Host acetech_21f_fw
|
||||||
|
HostName 220.135.87.91
|
||||||
|
User timmy
|
||||||
|
ProxyJump 211.23.141.208
|
||||||
|
|
||||||
|
# AceTech 21F 內網主機 (含 nip.io)
|
||||||
|
Host 192.168.68.1 192.168.68.1.nip.io
|
||||||
|
User timmy
|
||||||
|
ProxyJump acetech_21f_fw
|
||||||
|
|
||||||
13
config.d/digitalocean
Normal file
13
config.d/digitalocean
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# --- DigitalOcean (DO) ---
|
||||||
|
|
||||||
|
# DO Server (YOURLS 短網址)
|
||||||
|
Host do_yourls
|
||||||
|
HostName 64.23.128.29
|
||||||
|
User root
|
||||||
|
# 服務:Caddy 反向代理 + YOURLS
|
||||||
|
|
||||||
|
# DO Server (automodules.com)
|
||||||
|
Host do_automodules
|
||||||
|
HostName 167.71.96.197
|
||||||
|
User root
|
||||||
|
|
||||||
64
config.d/jason_hsieh
Normal file
64
config.d/jason_hsieh
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# Jason Hsieh's Home Server
|
||||||
|
Host jason_hsieh_home_srv
|
||||||
|
HostName 220.135.27.129
|
||||||
|
User timmy
|
||||||
|
Port 2022
|
||||||
|
Ciphers "^aes128-gcm@openssh.com,aes256-gcm@openssh.com"
|
||||||
|
# 端口轉發
|
||||||
|
LocalForward 13306 127.0.0.1:3306 # MySQL
|
||||||
|
LocalForward 11433 127.0.0.1:1433 # MSSQL
|
||||||
|
LocalForward 8080 127.0.0.1:8080 # Nginx
|
||||||
|
|
||||||
|
|
||||||
|
# GCP aaPanel 管理 (Root)
|
||||||
|
Host gcp_aapanel
|
||||||
|
HostName 35.200.32.232
|
||||||
|
User root
|
||||||
|
|
||||||
|
# GCP Server (i3bydo.com)
|
||||||
|
Host gcp_i3bydo
|
||||||
|
HostName 34.80.52.73
|
||||||
|
User loyangchun
|
||||||
|
IdentityFile ~/.ssh/google_compute_engine # 指定金鑰路徑
|
||||||
|
IdentitiesOnly yes # 只使用指定的金鑰
|
||||||
|
CheckHostIP no # 不檢查 IP 變動
|
||||||
|
UserKnownHostsFile ~/.ssh/google_compute_known_hosts # 獨立存放已知的連線紀錄
|
||||||
|
|
||||||
|
# Hospital Media Server (影音/通訊服務)
|
||||||
|
Host hospital_media
|
||||||
|
HostName 106.105.181.40
|
||||||
|
User tpech_1duan
|
||||||
|
ProxyJump jason_hsieh_home_srv
|
||||||
|
|
||||||
|
# Hospital Web Server (網頁/NPM 管理)
|
||||||
|
Host hospital_web
|
||||||
|
User tpech_1duan
|
||||||
|
HostName 106.105.181.70
|
||||||
|
ProxyJump jason_hsieh_home_srv
|
||||||
|
# 端口轉發設定
|
||||||
|
LocalForward 8181 127.0.0.1:81 # NPM 管理後台
|
||||||
|
LocalForward 8888 127.0.0.1:80 # 網頁服務
|
||||||
|
LocalForward 9090 127.0.0.1:8080 # Adminer
|
||||||
|
LocalForward 8001 127.0.0.1:8001 # PHP 容器 (直連)
|
||||||
|
|
||||||
|
Host 140.136.202.209
|
||||||
|
User fdirc
|
||||||
|
HostName 140.136.202.209
|
||||||
|
ProxyJump jason_hsieh_home_srv
|
||||||
|
|
||||||
|
Host 34.80.116.132
|
||||||
|
HostName 34.80.116.132
|
||||||
|
IdentityFile /Users/timmy/.ssh/google_compute_engine
|
||||||
|
UserKnownHostsFile=/Users/timmy/.ssh/google_compute_known_hosts
|
||||||
|
# HostKeyAlias=compute.97799509408430482
|
||||||
|
IdentitiesOnly=yes
|
||||||
|
CheckHostIP=no
|
||||||
|
|
||||||
|
# Fu Jen Dev Server (輔大)
|
||||||
|
Host fju_dev
|
||||||
|
User iduan
|
||||||
|
# 透過 bore 穿透內網
|
||||||
|
HostName 125.229.110.50
|
||||||
|
Port 9499
|
||||||
|
# HostName 140.136.181.229
|
||||||
|
# Port 2222
|
||||||
161
config.d/ma
Normal file
161
config.d/ma
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
Host 192.168.77.10
|
||||||
|
User root
|
||||||
|
|
||||||
|
# MA 防火牆
|
||||||
|
Host ma_fw
|
||||||
|
HostName 192.168.88.1
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
|
||||||
|
Host 192.168.88.2
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.88.99
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.88.4 192.168.88.4.nip.io
|
||||||
|
User pi
|
||||||
|
|
||||||
|
Host 192.168.88.10
|
||||||
|
User timmy
|
||||||
|
|
||||||
|
Host 192.168.88.11
|
||||||
|
User timmy
|
||||||
|
|
||||||
|
Host 192.168.88.12
|
||||||
|
User timmy
|
||||||
|
|
||||||
|
Host 192.168.88.13
|
||||||
|
User timmy # 預設使用者:連線時自動使用 timmy 帳號登入
|
||||||
|
|
||||||
|
Host 192.168.88.15
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.88.16
|
||||||
|
User timmy
|
||||||
|
|
||||||
|
Host 192.168.88.18
|
||||||
|
User timmy
|
||||||
|
LocalForward 50041 127.0.0.1:80
|
||||||
|
|
||||||
|
Host 192.168.88.19
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.88.30
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.88.31
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.88.173
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.88.32
|
||||||
|
User ubuntu
|
||||||
|
Port 22
|
||||||
|
|
||||||
|
Host 192.168.88.33
|
||||||
|
User timmy
|
||||||
|
|
||||||
|
# Mail Server MA (內網連線)
|
||||||
|
Host mail_ma_local 192.168.88.35
|
||||||
|
HostName 192.168.88.35
|
||||||
|
User timmy
|
||||||
|
LocalForward 16361 127.0.0.1:80 # Mail 管理介面
|
||||||
|
HostKeyAlgorithms +ssh-rsa # 支援舊版加密
|
||||||
|
PubkeyAcceptedKeyTypes +ssh-rsa # 支援舊版金鑰
|
||||||
|
|
||||||
|
# --- Timmy Personal Dev ---
|
||||||
|
|
||||||
|
# Timmy MA 開發機
|
||||||
|
Host timmy_ma_dev
|
||||||
|
HostName 192.168.88.81
|
||||||
|
User timmy
|
||||||
|
Port 2222
|
||||||
|
|
||||||
|
# MA 待確認主機 (密碼遺失)
|
||||||
|
Host ma_unknown_102
|
||||||
|
HostName 192.168.88.102
|
||||||
|
User timmy
|
||||||
|
# 備註:可連線,但忘記帳號密碼
|
||||||
|
|
||||||
|
# MA Confluence (知識管理系統)
|
||||||
|
Host ma_confluence
|
||||||
|
HostName 192.168.88.145
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
# MA Chao 的專案 (1)
|
||||||
|
Host ma_chao_app1
|
||||||
|
HostName 192.168.88.156
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
# MA Chao 的專案 (2)
|
||||||
|
Host ma_chao_app2
|
||||||
|
HostName 192.168.88.118
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
# MA MediaWiki (維基系統)
|
||||||
|
Host ma_mediawiki
|
||||||
|
HostName 192.168.88.173
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.88.181
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.88.193
|
||||||
|
User ubuntu
|
||||||
|
HostName 192.168.88.193
|
||||||
|
|
||||||
|
Host 192.168.88.194
|
||||||
|
User ubuntu
|
||||||
|
HostName 192.168.88.194
|
||||||
|
|
||||||
|
# This is VMware ESXi 6.0.0 Update 2 with the main firewall for MA on the 11th floor of Oriental Science Park (internal IP 192.168.88.1) and the firewall for implementing IPv6 (internal IP 192.168.88.150).
|
||||||
|
Host 192.168.88.241
|
||||||
|
User root
|
||||||
|
HostKeyAlgorithms +ssh-rsa
|
||||||
|
|
||||||
|
# This is the MA VMware ESXi 6.7.0 Update 1 server with a mail server, along with the firewall for the 5th floor of Oriental Science Park and a dedicated firewall for the mail server.
|
||||||
|
Host 192.168.88.248
|
||||||
|
User root
|
||||||
|
|
||||||
|
# This is the MA PVE server.
|
||||||
|
Host 192.168.88.247
|
||||||
|
User root
|
||||||
|
|
||||||
|
# This is the MA PVE server.
|
||||||
|
Host 192.168.88.249
|
||||||
|
User root
|
||||||
|
|
||||||
|
# This is the MA PVE server.
|
||||||
|
Host 192.168.88.73
|
||||||
|
User root
|
||||||
|
|
||||||
|
|
||||||
|
# This is the firewall for MA on the 5th floor of Oriental Science Park.
|
||||||
|
Host 192.168.3.88
|
||||||
|
User apple
|
||||||
|
ProxyJump 211.23.141.208
|
||||||
|
Ciphers aes256-cbc,aes256-ctr
|
||||||
|
|
||||||
|
# This is the firewall for MA on the 11th floor of Oriental Science Park.
|
||||||
|
Host 211.23.141.208
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
# This is the firewall for MA on the 11th floor of Oriental Science Park.
|
||||||
|
# Host 211.23.141.207
|
||||||
|
# User timmy
|
||||||
|
|
||||||
|
# This is the Ubuntu Server for the Serbia office.
|
||||||
|
Host 89.216.107.241 serbia-office
|
||||||
|
HostName 89.216.107.241
|
||||||
|
User timmy
|
||||||
|
Port 8022
|
||||||
|
Ciphers aes256-cbc,aes256-ctr
|
||||||
|
ProxyJump 211.23.141.208
|
||||||
|
|
||||||
|
# 遠振
|
||||||
|
Host 103.123.242.152 yz-prod
|
||||||
|
User root
|
||||||
|
HostName 103.123.242.152
|
||||||
|
HostKeyAlgorithms ssh-rsa
|
||||||
63
config.d/timmy
Normal file
63
config.d/timmy
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
Host timmy_home_server
|
||||||
|
User timmy
|
||||||
|
HostName 125.229.110.50
|
||||||
|
Ciphers aes256-cbc,aes256-ctr # Encryption algorithms for better security
|
||||||
|
|
||||||
|
Host 141.11.93.252
|
||||||
|
User root
|
||||||
|
HostName 141.11.93.252
|
||||||
|
Ciphers aes256-cbc,aes256-ctr # Encryption algorithms for better security
|
||||||
|
|
||||||
|
|
||||||
|
Host 192.168.42.123
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.10
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.38
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.39
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.40
|
||||||
|
User root
|
||||||
|
|
||||||
|
|
||||||
|
Host 192.168.42.101
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.102
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.112
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.106
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.120
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.42.121
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.42.122
|
||||||
|
User ubuntu
|
||||||
|
|
||||||
|
Host 192.168.42.211
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.118
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.124
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 192.168.42.126
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host 100.64.0.9
|
||||||
|
Port 8022
|
||||||
|
User u0_a291
|
||||||
28
create_ssh_symlinks.sh
Executable file
28
create_ssh_symlinks.sh
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Set default configuration
|
||||||
|
SHELL=/bin/sh
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
TZ='Asia/Taipei'
|
||||||
|
|
||||||
|
# Export environment variables
|
||||||
|
export PATH
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export LANGUAGE=en_US:en
|
||||||
|
|
||||||
|
# Base directory for SSH files in iCloud Drive
|
||||||
|
BASE_DIR="$HOME/Library/Mobile Documents/com~apple~CloudDocs/.ssh"
|
||||||
|
|
||||||
|
# Create .ssh directory if it doesn't exist
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
|
||||||
|
# Create symlinks for SSH config, keys, and config.d directory
|
||||||
|
ln -sf "$BASE_DIR/config" ~/.ssh/config
|
||||||
|
ln -sf "$BASE_DIR/id_ecdsa" ~/.ssh/id_ecdsa
|
||||||
|
ln -sf "$BASE_DIR/id_ecdsa.pub" ~/.ssh/id_ecdsa.pub
|
||||||
|
ln -sf "$BASE_DIR/id_rsa" ~/.ssh/id_rsa
|
||||||
|
ln -sf "$BASE_DIR/id_rsa.pub" ~/.ssh/id_rsa.pub
|
||||||
|
ln -sf "$BASE_DIR/config.d" ~/.ssh/config.d
|
||||||
|
|
||||||
|
# Create .ssh/sockets directory
|
||||||
|
mkdir -p ~/.ssh/sockets
|
||||||
15
delete_ssh_files.sh
Executable file
15
delete_ssh_files.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 定義預設的配置設定
|
||||||
|
SHELL=/bin/sh
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
TZ='Asia/Taipei'
|
||||||
|
|
||||||
|
# 將配置設定寫入環境變數
|
||||||
|
export PATH
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export LANGUAGE=en_US:en
|
||||||
|
|
||||||
|
# 刪除 .ssh 目錄中的配置文件、私鑰和公鑰文件
|
||||||
|
rm ~/.ssh/config ~/.ssh/id_ecdsa ~/.ssh/id_ecdsa.pub ~/.ssh/id_rsa ~/.ssh/id_rsa.pub
|
||||||
|
|
||||||
1
google_compute_engine.pub
Normal file
1
google_compute_engine.pub
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC0hqlgX6SOmOacR/FJ9Vi1sRKxrVCE5ooCd6eU1McKz3QCs68hRjGkLM4zjh1I/5yP8k/j8G+hqMBuzW1qxDwflHabKtwiFY2M1MqgT9nS2bWyoouE3v1UddXxqYtH0Cl7JdxcZmTWBw7ZkXjhF61Qg49X6YSQbeQ6AASfBoNLBVUtwbRqEy0MEljnGKi2NlznE8IU92uZkGSf5p79fva0VThA1GXmfuj29Xg/q4kZh+mGP5+PFBcKPmwmEJdRwITPEsrEAhRprjndDiv5qCbik49ds1GBDFbSXFv5Tgc/pKvGLQBXw9BAVlM2RiEK4j7BMAYy5acMatkKDP3s5OFpYQFP1iE1+OVXBXdFqhx5a5yDzmcNcNVavw4zmPOqR23C0LyKQht0DVq583EYeUeKqleFr0Ocn1VaER0SZZcTzF5hfjly/t7+gEp9IzMp+1T1gnEqSREcWhj/2fxxtvMcOq24Sv9u+jwBcXtiaOkTlm88UnJ4PspoqQN0wUKskB0= timmy@TimmydeMBP-15
|
||||||
1
id_ecdsa.pub
Normal file
1
id_ecdsa.pub
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHuWc3e6X0lLFhv7UXipU5ppxTxW1pnx5RVDG0EQVMdJtXRRyztO/jNVkGxW9+X1+kMQY4xMwUCx1vsUiwWCsgE=
|
||||||
1
id_rsa.pub
Normal file
1
id_rsa.pub
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZaJcoDQnUggR4dGrg4lX5hd9XTsAfgEER0ds7fxEZMoYEX4j9RwsIwE+Zimfn5B1e0Z5FZ2fkAVLQg07kC34ask4laGtP/72Q/8MnN+f34BZBLo5w8uMFpkMkn8R4y0EB/olEWVxobUeV63NKQ9wXxN2DITtLJcwo7V/6qzba0+sQaPAsnE1/VDgS9LyvP0QRY4crArmLdjEHsgaJoLhsXF1E/GbXsx1FLxVFsOSXoZxaDfVamGjJxDIavmnpYHaWHeFsCfyw5NnehvT6sFB3tHMyJ4fnOg627xDNxVvxrQjmdnzdmVRrTNGa9qbKmu+mzRWr9Tbs7RVAEdHLd/5x
|
||||||
23
ssh_key_management.sh
Executable file
23
ssh_key_management.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 定義預設的配置設定
|
||||||
|
SHELL=/bin/sh
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
TZ='Asia/Taipei'
|
||||||
|
|
||||||
|
# 將配置設定寫入環境變數
|
||||||
|
export PATH
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export LANGUAGE=en_US:en
|
||||||
|
|
||||||
|
# 啟動 SSH-Agent,它會在背景運行並管理 SSH 金鑰
|
||||||
|
eval $(ssh-agent)
|
||||||
|
|
||||||
|
# 將指定路徑的 SSH 私鑰加入到 SSH-Agent 中
|
||||||
|
# ssh-add ~/Sync/.ssh/
|
||||||
|
ssh-add ~/Sync/.ssh/aws_server_13_113_205_237.pem
|
||||||
|
ssh-add ~/Sync/.ssh/aws_server_18_177_222_167.pem
|
||||||
|
|
||||||
|
# 列出已經加入到 SSH-Agent 中的金鑰清單
|
||||||
|
ssh-add -l
|
||||||
|
|
||||||
Reference in New Issue
Block a user