Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Mister-leo/fssh
/ functions
Functions
183 in github.com/Mister-leo/fssh
⨍
Functions
183
◇
Types & classes
18
↓ 44 callers
Function
fatal
(err error)
cmd/fssh/main.go:268
↓ 13 callers
Function
Info
(msg string, fields map[string]interface{})
internal/log/log.go:24
↓ 10 callers
Function
Debug
(msg string, fields map[string]interface{})
internal/log/log.go:23
↓ 10 callers
Function
KeysDir
()
internal/store/store.go:41
↓ 7 callers
Function
printStepHeader
printStepHeader prints a step header
cmd/fssh/setup.go:167
↓ 6 callers
Function
ConfigPath
ConfigPath 返回 OTP 配置文件路径
internal/otp/config.go:40
↓ 6 callers
Function
LoadMasterKey
()
internal/keychain/keychain.go:97
↓ 6 callers
Function
MasterKeyExists
()
internal/keychain/keychain.go:18
↓ 6 callers
Function
readSSHConfigLines
()
internal/sshconfig/writer.go:192
↓ 6 callers
Function
sshConfigPath
--- Helper functions ---
internal/sshconfig/writer.go:166
↓ 5 callers
Function
LoadDecryptedRecord
(alias string, masterKey []byte)
internal/store/store.go:134
↓ 5 callers
Method
Unlock
(passphrase []byte)
internal/agent/secure_agent.go:230
↓ 5 callers
Function
findHostBlock
findHostBlock finds the line range of a host block Returns (start, end, found) where end is exclusive
internal/sshconfig/writer.go:247
↓ 5 callers
Function
resolveIPName
(target string)
cmd/fssh/shell.go:374
↓ 4 callers
Function
HKDF
(master []byte, salt []byte, info []byte, length int)
internal/crypt/crypt.go:11
↓ 4 callers
Function
LoadGlobalConfig
LoadGlobalConfig loads the Host * configuration block Returns (config, found, error)
internal/sshconfig/global.go:10
↓ 4 callers
Function
LoadHostConfig
LoadHostConfig loads a specific host configuration
internal/sshconfig/writer.go:113
↓ 4 callers
Method
Lock
(passphrase []byte)
internal/agent/secure_agent.go:229
↓ 4 callers
Function
PromptConfirm
PromptConfirm 提示用户确认(y/n)
internal/otp/prompt.go:83
↓ 4 callers
Function
PromptPassword
PromptPassword 安全地提示输入密码(不回显)
internal/otp/prompt.go:13
↓ 4 callers
Method
Remove
(pubkey ssh.PublicKey)
internal/agent/secure_agent.go:227
↓ 4 callers
Function
cleanInput
cleanInput 清理用户输入,移除控制序列和多余空白
internal/otp/prompt.go:98
↓ 4 callers
Function
cleanLinerInput
cleanLinerInput 清理 liner 输入,移除 ANSI 转义序列和控制字符
cmd/fssh/shell_commands.go:15
↓ 4 callers
Function
copyFile
copyFile copies a file from src to dst
internal/sshconfig/writer.go:503
↓ 4 callers
Function
displayHostname
(hi sshconfig.HostInfo)
cmd/fssh/shell.go:384
↓ 4 callers
Method
loadMetas
loadMetas 动态加载所有加密私钥的元数据
internal/agent/secure_agent.go:48
↓ 4 callers
Function
out
(l, msg string, fields map[string]interface{})
internal/log/log.go:38
↓ 4 callers
Function
setupLiner
(commands, hosts, hostnames, ips, ids []string)
cmd/fssh/shell.go:260
↓ 3 callers
Method
Add
(key xagent.AddedKey)
internal/agent/secure_agent.go:226
↓ 3 callers
Function
GetGlobalOptionHelp
GetGlobalOptionHelp retrieves help information for a global option
internal/sshconfig/hostconfig.go:347
↓ 3 callers
Function
GetGlobalOptionNames
GetGlobalOptionNames returns all supported global option names sorted alphabetically
internal/sshconfig/hostconfig.go:337
↓ 3 callers
Function
Load
()
internal/config/config.go:27
↓ 3 callers
Function
LoadConfig
LoadConfig 加载 OTP 配置
internal/otp/config.go:46
↓ 3 callers
Function
LoadHostInfos
()
internal/sshconfig/sshconfig.go:25
↓ 3 callers
Method
Mode
Mode 返回当前认证模式
internal/auth/auth.go:35
↓ 3 callers
Function
PromptInput
PromptInput 提示输入普通文本(可见回显)
internal/otp/prompt.go:137
↓ 3 callers
Function
SaveEncryptedRecord
(rec *Record, masterKey []byte)
internal/store/store.go:87
↓ 3 callers
Function
StoreMasterKey
(key []byte, overwrite bool)
internal/keychain/keychain.go:46
↓ 3 callers
Method
UnlockMasterKey
UnlockMasterKey 解锁并返回 master key 可能需要用户交互(Touch ID 或密码+验证码)
internal/auth/auth.go:27
↓ 3 callers
Function
ValidateHostConfig
ValidateHostConfig validates a host configuration
internal/sshconfig/hostconfig.go:68
↓ 3 callers
Function
WriteGlobalConfig
WriteGlobalConfig writes or updates the Host * configuration Creates the block at the END of config file if it doesn't exist
internal/sshconfig/global.go:32
↓ 3 callers
Function
backupSSHConfig
()
internal/sshconfig/writer.go:171
↓ 3 callers
Function
expandHome
(p string)
internal/config/config.go:75
↓ 3 callers
Function
parseHostBlock
parseHostBlock parses a host block into HostConfig
internal/sshconfig/writer.go:402
↓ 3 callers
Function
reloadHosts
reloadHosts reloads host information into the context
cmd/fssh/shell_commands.go:587
↓ 3 callers
Function
runSudoCommand
runSudoCommand runs a command with sudo
cmd/fssh/setup_binary.go:74
↓ 3 callers
Function
should
(l string)
internal/log/log.go:28
↓ 3 callers
Function
writeSSHConfigLines
(lines []string)
internal/sshconfig/writer.go:216
↓ 2 callers
Method
ApplyDefaults
()
internal/config/config.go:53
↓ 2 callers
Function
BuildProxyCommand
BuildProxyCommand constructs a ProxyCommand string for SOCKS5 proxies
internal/sshconfig/hostconfig.go:166
↓ 2 callers
Function
ConfigExists
ConfigExists 检查配置文件是否存在
internal/otp/config.go:95
↓ 2 callers
Function
DecryptAEAD
(key []byte, nonce []byte, ciphertext []byte, aad []byte)
internal/crypt/crypt.go:43
↓ 2 callers
Function
EncryptAEAD
(key []byte, nonce []byte, plaintext []byte, aad []byte)
internal/crypt/crypt.go:30
↓ 2 callers
Function
Generate
Generate 生成 TOTP 验证码 实现 RFC 6238 (TOTP) 和 RFC 4226 (HOTP) 标准
internal/otp/totp.go:33
↓ 2 callers
Function
GetAuthProvider
GetAuthProvider 自动选择并创建认证提供者 根据 auth_mode.json 或系统环境自动选择 Touch ID 或 OTP
internal/auth/auth.go:43
↓ 2 callers
Method
IsAvailable
IsAvailable 实现 AuthProvider 接口
internal/auth/otp.go:184
↓ 2 callers
Function
NewGlobalConfig
NewGlobalConfig creates a new HostConfig for global configuration (Host *)
internal/sshconfig/hostconfig.go:356
↓ 2 callers
Function
NewOTPProvider
NewOTPProvider 创建 OTP 认证提供者
internal/auth/otp.go:36
↓ 2 callers
Function
NewRecordFromPrivateKeyBytes
(alias string, keyFileBytes []byte, passphrase string, comment string)
internal/store/store.go:51
↓ 2 callers
Function
RandBytes
(r io.Reader, n int)
internal/crypt/crypt.go:59
↓ 2 callers
Function
SaveConfig
SaveConfig 保存 OTP 配置
internal/otp/config.go:71
↓ 2 callers
Function
SaveMode
SaveMode 保存认证模式
internal/auth/auth.go:113
↓ 2 callers
Function
WriteHostConfig
WriteHostConfig writes or updates a host configuration to ~/.ssh/config If overwrite is true, replaces existing host block If overwrite is false and h
internal/sshconfig/writer.go:14
↓ 2 callers
Function
cmdGlobalSet
cmdGlobalSet quickly sets a single option
cmd/fssh/shell_commands.go:850
↓ 2 callers
Function
cmdGlobalUnset
cmdGlobalUnset removes a single option
cmd/fssh/shell_commands.go:886
↓ 2 callers
Function
displayManualInstructions
displayManualInstructions shows manual configuration instructions
cmd/fssh/setup_sshconfig.go:95
↓ 2 callers
Function
initOTPMode
initOTPMode 初始化 OTP 认证模式
cmd/fssh/otp_init.go:16
↓ 2 callers
Function
initTouchIDMode
initTouchIDMode 初始化 Touch ID 认证模式
cmd/fssh/otp_init.go:74
↓ 2 callers
Function
masterKeyExistsForService
(svc string)
internal/keychain/keychain.go:29
↓ 2 callers
Function
modeConfigPath
modeConfigPath 返回认证模式配置文件路径
internal/auth/auth.go:142
↓ 2 callers
Function
normalizeConfigKey
normalizeConfigKey normalizes a config key to standard SSH format Converts various formats to the canonical SSH config key format
internal/sshconfig/global.go:144
↓ 2 callers
Function
parseKV
(line string)
internal/sshconfig/sshconfig.go:91
↓ 2 callers
Function
queryMasterKey
(svc string)
internal/keychain/keychain.go:119
↓ 2 callers
Function
renderHostBlock
renderHostBlock converts HostConfig to SSH config format
internal/sshconfig/writer.go:287
↓ 2 callers
Function
resolvePassphrase
(cli string, ask bool, file string, stdin bool, prompt string)
cmd/fssh/main.go:273
↓ 2 callers
Function
runShell
()
cmd/fssh/shell.go:16
↓ 2 callers
Function
secureClear
secureClear 安全清零字节数组 使用 runtime.KeepAlive 防止编译器优化掉清零操作
internal/auth/otp.go:220
↓ 2 callers
Function
setConfigField
setConfigField sets a config field by name
internal/sshconfig/global.go:169
↓ 1 callers
Function
DeleteHostConfig
DeleteHostConfig removes a host from SSH config
internal/sshconfig/writer.go:74
↓ 1 callers
Function
DeleteMasterKey
()
internal/keychain/keychain.go:129
↓ 1 callers
Function
DisplayInitResult
DisplayInitResult 显示初始化结果
internal/otp/init.go:113
↓ 1 callers
Function
DisplayRecoveryCodes
DisplayRecoveryCodes 显示恢复码
internal/otp/recovery.go:81
↓ 1 callers
Function
ExportPKCS8PEM
(rec *Record, passphrase string)
internal/store/store.go:167
↓ 1 callers
Function
GenerateRecoveryCodes
XXXX-XXXX-XXXX-XXXX GenerateRecoveryCodes 生成恢复码
internal/otp/recovery.go:14
↓ 1 callers
Function
HashRecoveryCodes
HashRecoveryCodes 计算恢复码的哈希 存储哈希而非明文,提高安全性
internal/otp/recovery.go:54
↓ 1 callers
Function
Init
(cfg *config.Config)
internal/log/log.go:15
↓ 1 callers
Function
Initialize
Initialize 初始化 OTP 配置 1. 生成随机 OTP seed 2. 使用密码加密 seed 3. 生成恢复码 4. 保存配置
internal/otp/init.go:42
↓ 1 callers
Function
IsValidGlobalOption
IsValidGlobalOption checks if a key is a supported global option
internal/sshconfig/hostconfig.go:331
↓ 1 callers
Function
LoadAllHostConfigs
LoadAllHostConfigs loads all host configurations
internal/sshconfig/writer.go:128
↓ 1 callers
Function
LoadMode
LoadMode 加载当前认证模式 读取 ~/.fssh/auth_mode.json,如果不存在则根据 Keychain 自动检测
internal/auth/auth.go:81
↓ 1 callers
Function
NewTouchIDProvider
NewTouchIDProvider 创建 Touch ID 认证提供者
internal/auth/touchid.go:14
↓ 1 callers
Function
PromptCode
PromptCode 提示输入 TOTP 验证码
internal/otp/prompt.go:56
↓ 1 callers
Function
PromptPasswordWithConfirm
PromptPasswordWithConfirm 提示输入密码并确认
internal/otp/prompt.go:37
↓ 1 callers
Function
RequireBiometry
(reason string)
internal/macos/touchid_darwin.go:45
↓ 1 callers
Function
SetGlobalOption
SetGlobalOption sets a single global configuration option Creates Host * block if it doesn't exist
internal/sshconfig/global.go:92
↓ 1 callers
Function
SetupLogging
(c *Config)
internal/config/config.go:62
↓ 1 callers
Method
Sign
(pubkey ssh.PublicKey, data []byte)
internal/agent/secure_agent.go:97
↓ 1 callers
Function
StartWithOptions
(socketPath string, requireTouchPerSign bool, ttlSeconds int)
internal/agent/server.go:23
↓ 1 callers
Method
UnlockMasterKey
UnlockMasterKey 实现 AuthProvider 接口 这是完整的双层认证流程: 1. 密码解锁 OTP seed(可能使用缓存) 2. TOTP 验证码验证(动态认证) 3. 从 seed 派生 master key
internal/auth/otp.go:123
↓ 1 callers
Function
UnsetGlobalOption
UnsetGlobalOption removes a global configuration option
internal/sshconfig/global.go:120
next →
1–100 of 183, ranked by callers