mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
feat: auto-accept only new SSH host keys using "-o StrictHostKeyChecking: accept-new" (#303)
* feat: add "StrictHostKeyChecking no" to ssh Disable host key checking to prevent interaction with ssh. Fixes: #297 Signed-off-by: Miek Gieben <miek@miek.nl> * use accept-new instead of no Signed-off-by: Miek Gieben <miek@miek.nl> * fix tests Signed-off-by: Miek Gieben <miek@miek.nl> * Fix tests here as well Signed-off-by: Miek Gieben <miek@miek.nl> --------- Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -131,6 +131,8 @@ func (c *SSHCLIConnector) buildSSHArgs() []string {
|
||||
// Disable interactive prompts (e.g., passphrase input) to prevent interference with the TUI.
|
||||
// Authentication must succeed non-interactively via SSH agent or unencrypted key.
|
||||
args = append(args, "-o", "BatchMode=yes")
|
||||
// Disable host key checking for parity with go+ssh.
|
||||
args = append(args, "-o", "StrictHostKeyChecking=accept-new")
|
||||
// Disable pseudo-terminal allocation to prevent SSH from executing as a login shell.
|
||||
args = append(args, "-T")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user