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 / option | Meaning |
|---|---|
<HOST> | SSH endpoint: [USER@]HOST[:PORT]; enclose IPv6 addresses in brackets |
[COMMAND]... | Remote shell command and arguments, interpreted as with ssh |
Options
| Argument / option | Meaning |
|---|---|
--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 |
-t | Request a terminal, including when running a command |
-T | Disable terminal allocation |
Help and version
| Argument / option | Meaning |
|---|---|
-h, --help | Show common usage and options |
--help-all | Show 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.