Table of Contents
SFTP browser, FTP 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 TermBench continues from where it stopped; the status line says how many files were resumed.
TermBench 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.
FTP sessions
New in 1.9.10. An FTP session opens the same two-pane window as the SFTP browser: this computer on the left, the FTP server on the right, with the same buttons (upload, download, new folder, rename, delete, permissions) and the same way of continuing a transfer that broke off.
Setting one up. Make a session with the protocol FTP (New Session, Quick Connect or Session Options) and give the host, the port (21) and the user name. Leave the user name blank for an anonymous login. Each FTP session keeps its own host and user name, so make one session for each server you use. Connect, or a double-click on the saved session, opens the window; an FTP session has no terminal tab.
The password is kept in the system password store, never in the settings file. There are two ways to save it:
- On the session's Connection page, pick a credential under Password. Credentials (Tools → Credentials) hold a user name and a password; the credential's user name is used for the login.
- Or leave it at “Ask in the window”: the window asks for the password when you connect, and once it has been accepted a Remember password button appears at the top of the window. Press it and the password is stored as a credential named “FTP <session name>”, which the saved session uses from then on.
A password that is refused is asked for again; a saved password that no longer works is said to be wrong and then asked for.
FTP over TLS. Tick FTP over TLS (explicit FTPS) on the Connection page to encrypt the login and the files. The first time, the window shows the fingerprint of the server's certificate and asks whether to trust it; type yes to trust and remember it (in known_ftp_certificates in the settings folder). A certificate that later changes is refused with a warning. Without TLS, FTP sends the password and the files unencrypted: use it only on a network you trust, or for anonymous downloads.
Things to know:
- Passive mode only, which is what works through routers and firewalls.
- No implicit FTPS (the old port 990 form).
- Permissions work only on servers that have
SITE CHMOD. - Times in listings from servers without
MLSDhave no time zone and are shown as the server gives them.
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. TermBench can put it there for you, like ssh-copy-id:
- 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.
- Choose the public key (the
.pubfile). The session's own key is offered first, then the keys in~/.ssh. Browse… picks another one. - Click Copy Key to Server and answer the questions in the window (the server's host key the first time, then your password).
TermBench then:
- creates
~/.sshand~/.ssh/authorized_keysif they are missing, - sets the permissions SSH insists on:
700for the folder and600for the file (SSH ignores the file if others can write to it), - adds the key unless it is already there (a commented-out copy does not count),
- logs in again with only that key, to check that it works.
If the server has a file called authorised_keys (British spelling), TermBench 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.soor a YubiKey'slibykcs11.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, TermBench starts one for its sessions, local shells and scripts, and stops it when TermBench 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.
