Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

syq ssh

Open a shell or run a command on a server:

syq ssh user@hostB
syq ssh --auth-from @laptop hostB -- hostname

Without --auth-from, syq uses your saved choice; auto and ssh run native SSH. @laptop uses your laptop’s SSH access, and an SSH provider endpoint uses that provider’s. Both open or reuse an approved account connection, which gives this machine full access to that account.

syq ssh [OPTIONS] <HOST> [-- [COMMAND]...]

Arguments

Argument / optionMeaning
<HOST>SSH endpoint: [USER@]HOST[:PORT]; enclose IPv6 addresses in brackets
[COMMAND]...Remote shell command and arguments, interpreted as with ssh

Options

Argument / optionMeaning
--auth-from <auto|ssh|@NAME|HOST>Whose SSH access to use: this machine’s own (auto or ssh), or access approved by a receiving machine (@NAME) or SSH authorization provider (HOST); omitted uses SYQ_AUTH_FROM, then the saved choice, then auto
--pscope <PATH>Use the scope that syq persist on --ephemeral created at PATH, with its own connections and settings
-tRequest a terminal, including when running a command
-TDisable terminal allocation

Help and version

Argument / optionMeaning
-h, --helpShow common usage and options
--help-allShow all options and details

Commands and terminals

Without a command, you get a shell. Use -t to request a terminal for a command or -T to disable one. Syq returns the remote exit status, or 255 for its own connection, authorization, and setup failures.

Put -- before a remote command. As with ssh, the remote shell interprets the arguments joined with spaces, so keep the quoting it needs:

syq ssh --auth-from @laptop hostB -- "printf '%s\n' 'two words'"

To run a program on your laptop instead, use syq exec. syq ssh has no port-forwarding options. With persistence on, its connection stays open after the session, so it forwards neither your SSH agent nor the port forwards in your SSH configuration; use plain ssh -A when you need your agent on the server.