Troubleshooting terminals, SFTP and port forwarding
What to do when a terminal keeps disconnecting, a transfer fails, a tunnel won't start or a snippet has nowhere to run.
My terminal disconnected and didn’t come back
When a connection drops, Duo22 keeps trying to reconnect for the time set in Settings → Terminal → Reconnect for (seconds) (30 seconds by default). If the tab shows Closed afterwards:
- The retry time may have run out. Click Reconnect in the terminal’s toolbar, or right-click the tab and choose Reconnect. You keep the output that was already on screen.
- Duo22 doesn’t keep retrying errors that a retry can’t fix, such as failed authentication or a rejected host key. The reason is printed in the terminal, for example
[couldn't reconnect: …]. Fix the host’s credentials or check its key, then reconnect. - If Reconnect for (seconds) is set to 0, auto-reconnect is off.
- Sessions you end yourself, for example with
exit, are not reconnected.
If a server takes a while to come back after a reboot, increase Reconnect for (seconds). The maximum is 3,600. See Terminal settings, command suggestions and auto-reconnect.
Search or copy shortcuts don’t do what I expect
- On Windows and Linux, copy is Ctrl+Shift+C, because Ctrl+C on its own interrupts the running command. To paste, right-click in the terminal and choose Paste.
- ⌘F / Ctrl+F searches the terminal that’s showing. Click the terminal first if it doesn’t respond.
See Search, copy and paste, and keyboard shortcuts.
Changes to font or scrollback didn’t apply
Terminal font, size and scrollback apply to newly opened terminals. Open a new tab for the host.
A command suggestion shows something I don’t want
Go to Settings → Terminal and click Clear command history, or turn off Suggest commands from history. To keep a single command out of the history, start it with a space.
The session log won’t start
If you see Couldn’t start the session log, check Settings → Terminal → Log folder. It must be a full path (or start with ~/), and Duo22 must be able to create folders there. Clear the box to go back to the default Duo22 Logs folder in Documents. See Saving terminal sessions to log files.
An SFTP transfer failed
Failed transfers are marked Failed in the transfers bar, and an alert shows Transfer failed: with the file name. Hover over the error text on the row to see all of it. A cancelled transfer may leave part of a file behind, so check the destination and delete it if needed.
If you can’t see a file you expect, it may be hidden. Open the pane’s ⋯ menu and choose Show hidden files.
If saving in the editor says the file changed on the server, something else edited it after you opened it. Choose Overwrite only if you want your version to replace it. See Transferring files with the SFTP browser.
A port forwarding rule shows “error”
Hover over the error badge to see the reason.
- cannot listen on …: the address or port can’t be used. Usually another program is already using that port. Pick a different port.
- server refused remote forward: the SSH server didn’t allow a Remote (-R) tunnel. Check the server’s SSH settings or ask its administrator.
- New rule is greyed out: forwarding runs over SSH, so you need at least one SSH host first.
See Port forwarding.
“Open a terminal first” when running a snippet
Snippets only run in terminals that are open and connected. Connect to a host, then run the snippet again. See Snippets and broadcasting commands.
Still stuck? Check the FAQ, or browse thehelp centre.