Kalgoorlie Retro Docs

Documentation for the Kalgoorlie Retro BBS, its games and servers

User Tools

Site Tools


saltbush:sftp

SFTP browser and SSH agent

SFTP browser

Right-click an SSH session in the Session Manager and choose SFTP Browser…, or choose Transfer → SFTP Browser… while an SSH tab is active. The browser logs in with the built-in SSH engine; questions such as a new host key, a password or a key passphrase appear in the window, with an Answer box.

The window has two panes: This computer on the left and the server on the right. The left pane starts in the session's download folder.

  • Double-click a folder to open it; Up goes to the parent folder; type a path and press Go to jump to it. Home (left side) goes to your home folder.
  • Click to select, Ctrl+click to select several, Shift+click to select a range.
  • Upload » copies the selected files and folders on the left to the server folder on the right. « Download copies the selected server files and folders to the folder on the left. Double-clicking a file copies it to the other side. You can also drop files on the window to upload them.
  • New Folder…, Rename… and Delete… work on either side. Delete asks first and deletes folders with everything in them; on this computer it is permanent (no recycle bin).
  • Permissions… (server side): tick read, write and run for the owner, the group and others, then Apply. The number (for example 0644) shows the same setting. It changes the selected items only, not what is inside a folder.
  • A progress bar shows the current file; Cancel stops the transfer.

Resuming transfers

A file being copied is saved as name.part until it is complete: on this computer for downloads, on the server for uploads. If a transfer is cancelled or the connection drops, the .part file stays. Send the same file again to the same folder and Saltbush continues from where it stopped; the status line says how many files were resumed.

Saltbush only continues when the .part file is not longer than the original and was written after the original last changed. Otherwise it starts again from the beginning. To force a fresh start, delete the .part file.

Copied files keep their modification time. Uploads from Linux also keep the file's permissions (a runnable script stays runnable).

Several browser windows can be open at once; each new one opens a little lower and to the right, and each side of a browser is in its own outlined box. The browser cannot open sessions that need the OpenSSH client (a jump host or extra -o options); use Transfer → Open SFTP Tab… for those.

Copy Public Key to Server

To log in with a key instead of a password, the server needs your public key in ~/.ssh/authorized_keys. Saltbush can put it there for you, like ssh-copy-id:

  1. Right-click an SSH session in the Session Manager and choose Copy Public Key to Server…, or choose Tools → Copy Public Key to Server… (it uses the active SSH tab, or the session selected in the Session Manager). After making a key with Generate… on the session's SSH2 page, the Copy to Server… button does the same.
  2. Choose the public key (the .pub file). The session's own key is offered first, then the keys in ~/.ssh. Browse… picks another one.
  3. Click Copy Key to Server and answer the questions in the window (the server's host key the first time, then your password).

Saltbush then:

  • creates ~/.ssh and ~/.ssh/authorized_keys if they are missing,
  • sets the permissions SSH insists on: 700 for the folder and 600 for the file (SSH ignores the file if others can write to it),
  • adds the key unless it is already there,
  • logs in again with only that key, to check that it works.

If the server has a file called authorised_keys (British spelling), Saltbush tells you: SSH only reads authorized_keys and ignores it.

The server needs a Unix-like shell (Linux, BSD, macOS). Windows OpenSSH servers keep keys elsewhere (administrators_authorized_keys for administrators), so add the key there by hand. Sessions that need the OpenSSH client (a jump host or extra -o options) cannot use it; run ssh-copy-id in a terminal instead.

SSH agent

Tools → SSH Agent… shows the agent your sessions use and the keys it holds.

  • Add a key file: choose the private key, type its passphrase, and optionally a time to keep it (in minutes) or “ask before each use”.
  • Smartcard or token (PKCS#11): choose the card's PKCS#11 library (for example OpenSC's opensc-pkcs11.so or a YubiKey's libykcs11.so; libraries found on the computer are listed under Found), type the PIN and press Add Smartcard Keys.
  • Remove one key, or Remove All Keys.
  • Lock hides the agent's keys until Unlock is pressed with the same password.
  • Start an Agent (Linux): if no agent is running, Saltbush starts one for its sessions, local shells and scripts, and stops it when Saltbush exits.

Passphrases, PINs and lock passwords are handed to ssh-add privately, never on a command line. On Windows, start the “OpenSSH Authentication Agent” service first.

saltbush/sftp.txt · Last modified: by slaterm