F7 with a taken name in an SSH pane silently succeeded because mkdir went
through MkdirAll (QA-10). The new SSHClient.MkdirNew creates missing
parents but fails with ErrExist on an existing name, like the local
MakeDir.
RemoveRecursive cleans its path first: lstat("link/") resolves the link on
POSIX servers and deleted the target's contents (QA-9; not reachable from
the UI).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A single known_hosts line with a key type x/crypto/ssh does not implement
(OpenSSH 10 ssh-mldsa44-ed25519) made knownhosts.New fail and every SSH
connection abort (QA-11). Such lines are now skipped with a warning in the
log. A host recorded only with an unsupported key type is refused instead
of being re-trusted on first use.
Host key algorithms of keys already recorded for the host are offered
first (like OpenSSH), so a host known only by its ed25519 key is not
reported as changed because x/crypto prefers ECDSA. Algorithms of skipped
lines are never offered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- sshConn/sftpCli are immutable after Connect; Close is serialized, only
sets an atomic closed flag and closes the clients, so concurrent calls
get errors instead of a data race or nil dereference (N-P0-8)
- Acquire/Release user counting: panes own the client from Connect,
mirror and remote copy/delete jobs take a reference, and leaving a host
(goParent at root, re-mirror, exit SSH mode) releases instead of closing
a client another pane or job still uses (N-P1-12, partial)
- ports TestCloseRace; adds a mirror-then-leave UI regression test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RemoveRecursive used Stat on the root, so deleting a remote symlink to a
directory walked into the target and deleted its contents. The root is
now examined with Lstat (links are removed with Remove), and Walk also
Lstats its root. Ports the analysts' TestRemoveRecursiveSymlinkToDir onto
the sshtest server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audited every copy/move/delete path (local, remote same-host, cross-host)
and fixed:
- Shell command injection in same-host remote cp/mv (unescaped paths
interpolated into exec strings); added remote.ShellQuote.
- Missing guard against copying/moving a directory into its own
subdirectory, locally and on same-host remote transfers (unbounded
recursion / disk fill). New regression tests in ops_test.go.
- Remote-to-remote same-path file copy silently truncating the source
file via Create() before it finished being read.
- Overwrite warning ("N existing target(s)") never shown for remote
destinations, only local ones.
- Remote same-host server-side cp never advancing the file-done counter
(waited on -v output that was never requested).
- Removed a dead "plan-then-confirm" subsystem (5 functions, 2 message
types, 2 unreachable Update() cases) superseded by the current design.
- Remote delete (SFTP) now runs as a cancellable job with the same
progress modal as local delete, instead of a single blocking call.
Also add a CI workflow that runs build/vet/test on every push and PR,
since previously they only ran on release tags.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Replace ssh.InsecureIgnoreHostKey() with TOFU verification against
~/.ssh/known_hosts (accept-new for unknown hosts, hard reject on a
changed key) to close a MITM hole on every SFTP connection.
- Actually connect to a running ssh-agent (SSH_AUTH_SOCK) for auth
instead of only scanning default key files on disk; give a clear
error when an explicit IdentityFile is passphrase-protected.
- Fix SSHClient.walk()/DirectorySize: the internal filepathSkipDir
sentinel leaked out as a real error on stat/ReadDir failures instead
of being swallowed, aborting size calculation on the first
unreadable subdirectory instead of skipping it.
- Skip symlink-to-directory entries in remote directory copies instead
of failing the whole transfer trying to Open() them as regular files.
- Consolidate 5 duplicated sudo-aware home-dir lookups into
internal/homedir, adding a missing os.Geteuid()==0 check before
trusting SUDO_USER.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Add Connected bool field to vfs.Entry and RemoteMount
- Track connection status in sshState.connectedHosts
- Show status icon (connected/disconnected) in pane header when browsing remote host
- Async SSH connection test with cancel support for Add Host dialog
- Colored labels and styled help text in SSH dialogs
- Confirmation dialog when deleting manually-added SSH hosts