MCPcopy Create free account

hub / github.com/Mister-leo/fssh / functions

Functions183 in github.com/Mister-leo/fssh

↓ 44 callersFunctionfatal
(err error)
cmd/fssh/main.go:268
↓ 13 callersFunctionInfo
(msg string, fields map[string]interface{})
internal/log/log.go:24
↓ 10 callersFunctionDebug
(msg string, fields map[string]interface{})
internal/log/log.go:23
↓ 10 callersFunctionKeysDir
()
internal/store/store.go:41
↓ 7 callersFunctionprintStepHeader
printStepHeader prints a step header
cmd/fssh/setup.go:167
↓ 6 callersFunctionConfigPath
ConfigPath 返回 OTP 配置文件路径
internal/otp/config.go:40
↓ 6 callersFunctionLoadMasterKey
()
internal/keychain/keychain.go:97
↓ 6 callersFunctionMasterKeyExists
()
internal/keychain/keychain.go:18
↓ 6 callersFunctionreadSSHConfigLines
()
internal/sshconfig/writer.go:192
↓ 6 callersFunctionsshConfigPath
--- Helper functions ---
internal/sshconfig/writer.go:166
↓ 5 callersFunctionLoadDecryptedRecord
(alias string, masterKey []byte)
internal/store/store.go:134
↓ 5 callersMethodUnlock
(passphrase []byte)
internal/agent/secure_agent.go:230
↓ 5 callersFunctionfindHostBlock
findHostBlock finds the line range of a host block Returns (start, end, found) where end is exclusive
internal/sshconfig/writer.go:247
↓ 5 callersFunctionresolveIPName
(target string)
cmd/fssh/shell.go:374
↓ 4 callersFunctionHKDF
(master []byte, salt []byte, info []byte, length int)
internal/crypt/crypt.go:11
↓ 4 callersFunctionLoadGlobalConfig
LoadGlobalConfig loads the Host * configuration block Returns (config, found, error)
internal/sshconfig/global.go:10
↓ 4 callersFunctionLoadHostConfig
LoadHostConfig loads a specific host configuration
internal/sshconfig/writer.go:113
↓ 4 callersMethodLock
(passphrase []byte)
internal/agent/secure_agent.go:229
↓ 4 callersFunctionPromptConfirm
PromptConfirm 提示用户确认(y/n)
internal/otp/prompt.go:83
↓ 4 callersFunctionPromptPassword
PromptPassword 安全地提示输入密码(不回显)
internal/otp/prompt.go:13
↓ 4 callersMethodRemove
(pubkey ssh.PublicKey)
internal/agent/secure_agent.go:227
↓ 4 callersFunctioncleanInput
cleanInput 清理用户输入,移除控制序列和多余空白
internal/otp/prompt.go:98
↓ 4 callersFunctioncleanLinerInput
cleanLinerInput 清理 liner 输入,移除 ANSI 转义序列和控制字符
cmd/fssh/shell_commands.go:15
↓ 4 callersFunctioncopyFile
copyFile copies a file from src to dst
internal/sshconfig/writer.go:503
↓ 4 callersFunctiondisplayHostname
(hi sshconfig.HostInfo)
cmd/fssh/shell.go:384
↓ 4 callersMethodloadMetas
loadMetas 动态加载所有加密私钥的元数据
internal/agent/secure_agent.go:48
↓ 4 callersFunctionout
(l, msg string, fields map[string]interface{})
internal/log/log.go:38
↓ 4 callersFunctionsetupLiner
(commands, hosts, hostnames, ips, ids []string)
cmd/fssh/shell.go:260
↓ 3 callersMethodAdd
(key xagent.AddedKey)
internal/agent/secure_agent.go:226
↓ 3 callersFunctionGetGlobalOptionHelp
GetGlobalOptionHelp retrieves help information for a global option
internal/sshconfig/hostconfig.go:347
↓ 3 callersFunctionGetGlobalOptionNames
GetGlobalOptionNames returns all supported global option names sorted alphabetically
internal/sshconfig/hostconfig.go:337
↓ 3 callersFunctionLoad
()
internal/config/config.go:27
↓ 3 callersFunctionLoadConfig
LoadConfig 加载 OTP 配置
internal/otp/config.go:46
↓ 3 callersFunctionLoadHostInfos
()
internal/sshconfig/sshconfig.go:25
↓ 3 callersMethodMode
Mode 返回当前认证模式
internal/auth/auth.go:35
↓ 3 callersFunctionPromptInput
PromptInput 提示输入普通文本(可见回显)
internal/otp/prompt.go:137
↓ 3 callersFunctionSaveEncryptedRecord
(rec *Record, masterKey []byte)
internal/store/store.go:87
↓ 3 callersFunctionStoreMasterKey
(key []byte, overwrite bool)
internal/keychain/keychain.go:46
↓ 3 callersMethodUnlockMasterKey
UnlockMasterKey 解锁并返回 master key 可能需要用户交互(Touch ID 或密码+验证码)
internal/auth/auth.go:27
↓ 3 callersFunctionValidateHostConfig
ValidateHostConfig validates a host configuration
internal/sshconfig/hostconfig.go:68
↓ 3 callersFunctionWriteGlobalConfig
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 callersFunctionbackupSSHConfig
()
internal/sshconfig/writer.go:171
↓ 3 callersFunctionexpandHome
(p string)
internal/config/config.go:75
↓ 3 callersFunctionparseHostBlock
parseHostBlock parses a host block into HostConfig
internal/sshconfig/writer.go:402
↓ 3 callersFunctionreloadHosts
reloadHosts reloads host information into the context
cmd/fssh/shell_commands.go:587
↓ 3 callersFunctionrunSudoCommand
runSudoCommand runs a command with sudo
cmd/fssh/setup_binary.go:74
↓ 3 callersFunctionshould
(l string)
internal/log/log.go:28
↓ 3 callersFunctionwriteSSHConfigLines
(lines []string)
internal/sshconfig/writer.go:216
↓ 2 callersMethodApplyDefaults
()
internal/config/config.go:53
↓ 2 callersFunctionBuildProxyCommand
BuildProxyCommand constructs a ProxyCommand string for SOCKS5 proxies
internal/sshconfig/hostconfig.go:166
↓ 2 callersFunctionConfigExists
ConfigExists 检查配置文件是否存在
internal/otp/config.go:95
↓ 2 callersFunctionDecryptAEAD
(key []byte, nonce []byte, ciphertext []byte, aad []byte)
internal/crypt/crypt.go:43
↓ 2 callersFunctionEncryptAEAD
(key []byte, nonce []byte, plaintext []byte, aad []byte)
internal/crypt/crypt.go:30
↓ 2 callersFunctionGenerate
Generate 生成 TOTP 验证码 实现 RFC 6238 (TOTP) 和 RFC 4226 (HOTP) 标准
internal/otp/totp.go:33
↓ 2 callersFunctionGetAuthProvider
GetAuthProvider 自动选择并创建认证提供者 根据 auth_mode.json 或系统环境自动选择 Touch ID 或 OTP
internal/auth/auth.go:43
↓ 2 callersMethodIsAvailable
IsAvailable 实现 AuthProvider 接口
internal/auth/otp.go:184
↓ 2 callersFunctionNewGlobalConfig
NewGlobalConfig creates a new HostConfig for global configuration (Host *)
internal/sshconfig/hostconfig.go:356
↓ 2 callersFunctionNewOTPProvider
NewOTPProvider 创建 OTP 认证提供者
internal/auth/otp.go:36
↓ 2 callersFunctionNewRecordFromPrivateKeyBytes
(alias string, keyFileBytes []byte, passphrase string, comment string)
internal/store/store.go:51
↓ 2 callersFunctionRandBytes
(r io.Reader, n int)
internal/crypt/crypt.go:59
↓ 2 callersFunctionSaveConfig
SaveConfig 保存 OTP 配置
internal/otp/config.go:71
↓ 2 callersFunctionSaveMode
SaveMode 保存认证模式
internal/auth/auth.go:113
↓ 2 callersFunctionWriteHostConfig
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 callersFunctioncmdGlobalSet
cmdGlobalSet quickly sets a single option
cmd/fssh/shell_commands.go:850
↓ 2 callersFunctioncmdGlobalUnset
cmdGlobalUnset removes a single option
cmd/fssh/shell_commands.go:886
↓ 2 callersFunctiondisplayManualInstructions
displayManualInstructions shows manual configuration instructions
cmd/fssh/setup_sshconfig.go:95
↓ 2 callersFunctioninitOTPMode
initOTPMode 初始化 OTP 认证模式
cmd/fssh/otp_init.go:16
↓ 2 callersFunctioninitTouchIDMode
initTouchIDMode 初始化 Touch ID 认证模式
cmd/fssh/otp_init.go:74
↓ 2 callersFunctionmasterKeyExistsForService
(svc string)
internal/keychain/keychain.go:29
↓ 2 callersFunctionmodeConfigPath
modeConfigPath 返回认证模式配置文件路径
internal/auth/auth.go:142
↓ 2 callersFunctionnormalizeConfigKey
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 callersFunctionparseKV
(line string)
internal/sshconfig/sshconfig.go:91
↓ 2 callersFunctionqueryMasterKey
(svc string)
internal/keychain/keychain.go:119
↓ 2 callersFunctionrenderHostBlock
renderHostBlock converts HostConfig to SSH config format
internal/sshconfig/writer.go:287
↓ 2 callersFunctionresolvePassphrase
(cli string, ask bool, file string, stdin bool, prompt string)
cmd/fssh/main.go:273
↓ 2 callersFunctionrunShell
()
cmd/fssh/shell.go:16
↓ 2 callersFunctionsecureClear
secureClear 安全清零字节数组 使用 runtime.KeepAlive 防止编译器优化掉清零操作
internal/auth/otp.go:220
↓ 2 callersFunctionsetConfigField
setConfigField sets a config field by name
internal/sshconfig/global.go:169
↓ 1 callersFunctionDeleteHostConfig
DeleteHostConfig removes a host from SSH config
internal/sshconfig/writer.go:74
↓ 1 callersFunctionDeleteMasterKey
()
internal/keychain/keychain.go:129
↓ 1 callersFunctionDisplayInitResult
DisplayInitResult 显示初始化结果
internal/otp/init.go:113
↓ 1 callersFunctionDisplayRecoveryCodes
DisplayRecoveryCodes 显示恢复码
internal/otp/recovery.go:81
↓ 1 callersFunctionExportPKCS8PEM
(rec *Record, passphrase string)
internal/store/store.go:167
↓ 1 callersFunctionGenerateRecoveryCodes
XXXX-XXXX-XXXX-XXXX GenerateRecoveryCodes 生成恢复码
internal/otp/recovery.go:14
↓ 1 callersFunctionHashRecoveryCodes
HashRecoveryCodes 计算恢复码的哈希 存储哈希而非明文,提高安全性
internal/otp/recovery.go:54
↓ 1 callersFunctionInit
(cfg *config.Config)
internal/log/log.go:15
↓ 1 callersFunctionInitialize
Initialize 初始化 OTP 配置 1. 生成随机 OTP seed 2. 使用密码加密 seed 3. 生成恢复码 4. 保存配置
internal/otp/init.go:42
↓ 1 callersFunctionIsValidGlobalOption
IsValidGlobalOption checks if a key is a supported global option
internal/sshconfig/hostconfig.go:331
↓ 1 callersFunctionLoadAllHostConfigs
LoadAllHostConfigs loads all host configurations
internal/sshconfig/writer.go:128
↓ 1 callersFunctionLoadMode
LoadMode 加载当前认证模式 读取 ~/.fssh/auth_mode.json,如果不存在则根据 Keychain 自动检测
internal/auth/auth.go:81
↓ 1 callersFunctionNewTouchIDProvider
NewTouchIDProvider 创建 Touch ID 认证提供者
internal/auth/touchid.go:14
↓ 1 callersFunctionPromptCode
PromptCode 提示输入 TOTP 验证码
internal/otp/prompt.go:56
↓ 1 callersFunctionPromptPasswordWithConfirm
PromptPasswordWithConfirm 提示输入密码并确认
internal/otp/prompt.go:37
↓ 1 callersFunctionRequireBiometry
(reason string)
internal/macos/touchid_darwin.go:45
↓ 1 callersFunctionSetGlobalOption
SetGlobalOption sets a single global configuration option Creates Host * block if it doesn't exist
internal/sshconfig/global.go:92
↓ 1 callersFunctionSetupLogging
(c *Config)
internal/config/config.go:62
↓ 1 callersMethodSign
(pubkey ssh.PublicKey, data []byte)
internal/agent/secure_agent.go:97
↓ 1 callersFunctionStartWithOptions
(socketPath string, requireTouchPerSign bool, ttlSeconds int)
internal/agent/server.go:23
↓ 1 callersMethodUnlockMasterKey
UnlockMasterKey 实现 AuthProvider 接口 这是完整的双层认证流程: 1. 密码解锁 OTP seed(可能使用缓存) 2. TOTP 验证码验证(动态认证) 3. 从 seed 派生 master key
internal/auth/otp.go:123
↓ 1 callersFunctionUnsetGlobalOption
UnsetGlobalOption removes a global configuration option
internal/sshconfig/global.go:120
next →1–100 of 183, ranked by callers