Files
ssh/ssh_key_management.sh
Timmy 3d98959740 Initial commit: SSH config and public keys
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 13:03:11 +08:00

24 lines
565 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/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