gtlssh(1)
gtlssh / gsh โ Shell connection over TLS ๐
okay bestie, sit down, hydrate, and let me tell you about the icon that is gtlssh(1) โ and its lowercase twin gsh. no cap, this is the manual page you've been waiting for. ๐ซถ
โจ SYNOPSIS โจ
gtlssh [options] <host> [<program>]
gsh [options] <host> [<program>]
literally just pick one of those two names and go. ๐ธ
๐ DESCRIPTION ๐
so here's the vibe: gtlssh connects to a remote server, authenticates the remote server using SSL, and then authenticates itself with the server. mutual trust, mutual slay. ๐ฅ
gsh is a synonym for gtlssh that runs in ssh compatibility by default. same program, different energy. โจ
and gtlsshd will attempt an SCTP connection first, and fall back to TCP if that doesn't work. it's giving "try the fancy door first, then the normal door." ๐ช
๐ช WINDOWS HACKS ๐ช
See "WINDOWS HACKS" in the gtlssh-keygen.1 man page for information about special windows configuration. iykyk, windows girlies, go read that one. ๐
โญ OPTIONS โญ
-p,--portport โ Use the given port instead of the default port. ๐ฎ-i,--keyfilefile โ Use the given file for the key instead of the default. If you specify this, the certfile will be the same name ending in.crt, unless you specify it explicitly. ๐๏ธ--certfilefile โ Set the certificate to use. ๐--cadirdirectory โ Set the directory that holds the certificate authority used to authenticate the server. ๐๏ธ-e,--esccharchar โ Specify a character to use for the escape character. Setting it to-1disables the escape character. This can either be a decimal or hexadeximal number or^xto set a control character. By default it is^\if io1 is the default and stdin is a tty, or disabled otherwise. See ESCAPES below for more details on the escape character. Only handled on io1. ๐ชโจ--ssh-compatโ Enable ssh-compatible command handling. Default forgsh, off by default forgtlssh.
gtlssh normally handles commands by passing individual arguments over as separate arguments then passing them to the remote command as such. In ssh compatible mode, it will work like ssh, combining all remaining arguments with a space between them and passing them as a single command.
gtlssh command handling is a little more sane, if you run gsh server ls '/a b' it will do what you expect. ssh will not. But some programs expect it to work as ssh does.
Added in gensio-3.0.4. ๐
--nossh-compatโ Disable ssh-compatible command handling. bye compat. ๐-r,--telnetโ Do telnet processing with RFC2217 handling. ๐--nosctpโ Disable SCTP support. It is disabled by default. (so this is like, double-disabling? whatever, it's here.) ๐--sctpโ Enable SCTP support. let's gooo ๐ฅ--notcpโ Disable TCP support. ๐ซ--transport<connecter> โ Instead of using SCTP or TCP, use the given gensio connecter for transport. In this case, the host is required but the hostname part is ignored. This is so the username can be set, if required. ๐-m,--mdnsโ Look up the name using mDNS. This will fetch then IP address, IPv4 or IPv6, the port number and whether telnet is required and make the connection. ๐ฆ--mdns-typeโ Set the type used for the lookup. See thegmdns(1)man page under 'STRING VALUES FOR QUERIES' for detail on how to do regex, glob, etc. ๐--nomuxโ Don't use a mux gensio. This may cause issues withgtlsshd, but is useful in some cases for talking with ser2net with no mux support. ๐ฌ--nointeractiveโ Not an interactive login, for programs and such. Do not prompt for passwords or do any other interactive operations. ๐ค--nointeractive-pwโ If nointeractive is set, allow for prompting for a password on the console. You will only get one time to enter the password correctly. โ ๏ธ no pressure bestie--privilegedโ When logging onto a Windows server, don't drop privileges on a privileged account. Normally you are logged in and run as a normal user (with a privileged linked token), this will allow you just run privileged. Requires--allow-rooton the server. ๐-L<accept addr>:<connect addr> โ Listen at the <accept addr> on the local machine, and if a connection comes in forward it to the <connect addr> from the remote machine on the gtlssh connection. A local address is in the form[<bind addr>:][sctp|tcp,]portor<unix socket path>. Remote addresses are in the form<hostname>:[sctp|tcp,]portor<unix socket path>. If a name begins with/it is a unix socket path. <hostname> and <bindaddr> are standard internet names or addresses. ๐-R<accept addr>:<connect addr> โ Like-L, except the <accept addr> is on the remote machine and <connect addr> is done from the local machine. ๐-4โ Do IPv4 only. 4๏ธโฃ-6โ Do IPv6 only. 6๏ธโฃ-d,--debugโ Generate debugging output. Specifying more than once increases the output. ๐ (stack it like a combo, fr fr)--versionโ Print the version number and exit. ๐-h,--helpโ Help output. ๐
๐ HOST AUTHENTICATION ๐
After connecting, the host is first validated using standard SSL. The keys used for validation are in $HOME/.gtlssh/server_certs by default. If the given key is not recognized, the user is prompted with the certificate fingerprint asking if the user wants to accept the certificate. ๐
If the user accepts the certificate, then it is added into the default directory. If not, the connection is terminated. bye. ๐
Certificates are stored in the form "<hostname>,<port>.crt" and "<ipaddress>,<port>.crt". Both are created for a connection (unless connecting with an IP address). A connection is verified as matching both entries, if the certificate in the file does not match the certificate from the remote end, the connection is terminated and the user informed. ๐จ
๐ซถ USER AUTHENTICATION ๐ซถ
If host authentication succeeds, gtlssh authenticates itself with a key and certificate. These files are fetch by default from $HOME/.gtlssh/keycerts in the form <host>[,<port>].key and <host>[,<port>].crt. If the form with the host and port exists, that is taken. Otherwise if the form with just the host exists, it is taken. Otherwise it defaults to $HOME/.gtlssh/default.key and $HOME/.gttlssh/default.crt. ๐๏ธ
The remote end looks in $HOME/.gtlssh/allowed_certs for the certificate. If the remote end does not have the certificate presented, then password authentication is tried. ๐
๐ซ ITERACTIVE MODE ๐ซ
If the stdin for gtlssh is a tty and no program is given to run, then the login is an interactive login. Any sort of delay in I/O processing is disabled, and the local terminal is used for I/O and it is put into raw mode. ๐ฅ๏ธโจ
In non-interactive mode, the local side uses stdio for local I/O and I/O processing delay on the network side is not disabled. This is useful for programs transferring data over the connection. ๐ฆ
๐ช ESCAPES ๐ช
If the escape character is received from the user, the character is not transferred and the program waits for another character. If the other character is also the escape character, a single escape character is sent. If the other character is not recognized as a valid escape, it is ignore and not transferred. Upper and lower case are equivalent. ๐
Escape characters are:
qโ Quit the program. ๐ชbโ Send a break to io2. Ignored if io2 does not support break. ๐dโ Dump serial data for io2. Ignored if io2 is not a RFC2217 capable. ๐sโ Set the serial port (baud) rate for io2. Ignored if io2 is not RFC2177 capable. After this, the serial port speed must be typed, terminated by a new line. Invalid speeds are ignore, useescchar-dto know if you set it right. โฉn,o,eโ Set the parity on io2 to none, odd, or even. Ignored if io2 is not RFC2217 capable. โ๏ธ7,8โ Set the data size on io2 to 7 or 8 bits. Ignored if io2 is not RFC2217 capable. ๐ข1,2โ Set the number of stop bits to 1 or 2 on io2 bits. Ignored if io2 is not RFC2217 capable. ๐
๐ SEE ALSO ๐
gensio(5), gtlsshd(1), gtlssh-keygen(1), gmdns(1)
go read those too, they're all part of the fam. ๐ซถ
๐ KNOWN PROBLEMS ๐
None.
(not me being shook. she's flawless. periodt. ๐)
๐ AUTHOR ๐
Corey Minyard <minyard@acm.org>
and that's the whole thing bestie!! ๐ this was the gtlssh(1) page, Shell connection over TLS, from 01/02/19 โ go forth and connect securely, you absolute icon. ๐โจ๐๐ฆ๐ธ
๐ฆ where this page comes from
- arch rolling: gensio 3.0.4-1 ยท GPL
- fedora 43: gensio 3.0.4-1.fc43 ยท GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: gensio 3.0.4-1.fc44 ยท GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms