did you know that SSH has a little-known secret menu?
-
did you know that SSH has a little-known secret menu?
i wrote a post about this on cohost a while back, but since that site shut down i'm posting it here too
@rebane2001 I'm forever annoyed that the command sequence starter is a newline of all things.
Telnet's UX was a lot better in this regard imo.
-
@agowa338 @rebane2001 MacOS and Windows both have plain OpenSSH, and the listed escape sequences work on both.
@bob_zim @agowa338 @rebane2001 *if* your keyboard layout has a functioning tilde key (a deadkey might output something else and it's nontrivial to make it output just the character itself (and it depends on the OS how it deals with it))
-
did you know that SSH has a little-known secret menu?
i wrote a post about this on cohost a while back, but since that site shut down i'm posting it here too
@rebane2001 I did!!!!! do I win anything?!?!?!
-
did you know that SSH has a little-known secret menu?
i wrote a post about this on cohost a while back, but since that site shut down i'm posting it here too
@rebane2001@infosec.exchange yes. i just happened to look at the man page for it yesterday.
-
@bob_zim @agowa338 @rebane2001 *if* your keyboard layout has a functioning tilde key (a deadkey might output something else and it's nontrivial to make it output just the character itself (and it depends on the OS how it deals with it))
@phl @bob_zim @agowa338 @rebane2001 For me, on a mac, hitting the deadkey and then space works. So, <Enter> ~ <Space> ? gets me to that menu.
-
@bob_zim @agowa338 @rebane2001 *if* your keyboard layout has a functioning tilde key (a deadkey might output something else and it's nontrivial to make it output just the character itself (and it depends on the OS how it deals with it))
@phl Huh. I’m not sure I’ve seen a non-exotic (e.g, not for a Corne) layout which entirely lacks tilde as a discrete character. On my German keyboards, it’s on the AltGr layer of the +/* key. Same on Spanish QWERTY keyboards I’ve seen.
Not doubting that such a keyboard exists, I just thought I had seen most of the mass-produced layouts.
-
did you know that SSH has a little-known secret menu?
i wrote a post about this on cohost a while back, but since that site shut down i'm posting it here too
@rebane2001 Disabled by default on openssh *client* 9.2 and above.
https://github.com/openssh/openssh-portable/commit/f7cebbbf407d772ed71403d314343766782fe540
```
Host *
EnableEscapeCommandline yes
```
In your ssh_config file to re-enable it. -
@rebane2001 Disabled by default on openssh *client* 9.2 and above.
https://github.com/openssh/openssh-portable/commit/f7cebbbf407d772ed71403d314343766782fe540
```
Host *
EnableEscapeCommandline yes
```
In your ssh_config file to re-enable it.@baloo@sfba.social @rebane2001@infosec.exchange that's only the command line (
~c). the other escape sequences still work by default. -
@baloo@sfba.social @rebane2001@infosec.exchange that's only the command line (
~c). the other escape sequences still work by default. -
Yes, but did you know that it is basically inaccessible on Keyboard layouts like e.g. de-DE?
@agowa338 @rebane2001 you can whine about it or you can read the manual and add EscapeChar to your ssh config to set it to any other character.
-
@baloo @mica @rebane2001 it’s a good security default. Imagine a bastion host or other program that allows you to ssh to a target host. The expectation is that all you can do is interact with the terminal on the target, or exit. However, the ssh escape allows you to create and delete tunnels, amongst other things, which might not have been anticipated. Disabling by default removes the surprise.
-
did you know that SSH has a little-known secret menu?
i wrote a post about this on cohost a while back, but since that site shut down i'm posting it here too
I did not, but I am not surprised. I use ~^Z often, ~. sometimes, am old enough to remember ~ commands from mailx, and the ^] break in telnet.
-
did you know that SSH has a little-known secret menu?
i wrote a post about this on cohost a while back, but since that site shut down i'm posting it here too
@rebane2001 Yes, but unfortunately it is not available for multiplexed sessions 🥲
-
@phl @bob_zim @agowa338 @rebane2001 For me, on a mac, hitting the deadkey and then space works. So, <Enter> ~ <Space> ? gets me to that menu.
@khrister @phl @bob_zim @rebane2001
Which makes it a different key combination and - well - try googling for it. I've literally never seen this being documented (in a discoverable way) anywhere.
-
@phl Huh. I’m not sure I’ve seen a non-exotic (e.g, not for a Corne) layout which entirely lacks tilde as a discrete character. On my German keyboards, it’s on the AltGr layer of the +/* key. Same on Spanish QWERTY keyboards I’ve seen.
Not doubting that such a keyboard exists, I just thought I had seen most of the mass-produced layouts.
But the keyboard sequence becomes different and just trying to press it is annoying to impossible. Esp. if you then also try to do it over e.g an additional IPMI or VMware console in between as well.
It's just one of these things that feel like nobody expected anything but en-US being used as it just sucks. Almost always it is easier to first change your keyboard layout to en-US, press the keyboard shortcut, and switch it back...
-
@agowa338 @rebane2001 you can whine about it or you can read the manual and add EscapeChar to your ssh config to set it to any other character.
I could do that If I'd only connect from one device to a hand full of other devices. But that just doesn't work when you're doing work for customers.
Configuring that would be even harder than getting the key combination changed within the OpenSSH source code for everyone...
-
But the keyboard sequence becomes different and just trying to press it is annoying to impossible. Esp. if you then also try to do it over e.g an additional IPMI or VMware console in between as well.
It's just one of these things that feel like nobody expected anything but en-US being used as it just sucks. Almost always it is easier to first change your keyboard layout to en-US, press the keyboard shortcut, and switch it back...
@agowa338 @phl It doesn’t become a different sequence, though? Immediately after a new line, send a tilde character to signify the next character is a control character, then send the control character (e.g, ? to get the help and command line). Sure, you may press different keys to cause your keyboard to emit the tilde, but that doesn’t make it a different sequence. For example, nobody specifies Shift-/ in these sequences, they specify ?, and it’s up to you to get your keyboard to emit that character.
Yes, software trying to read scan codes directly and interpret them as US keyboards sucks, but that’s hardly the fault of applications like OpenSSH which do no such thing.
-
@khrister @phl @bob_zim @rebane2001
Which makes it a different key combination and - well - try googling for it. I've literally never seen this being documented (in a discoverable way) anywhere.
@agowa338 Neither have I. Well, I somehow learned <Enter> ~ ^Z, not sure how. The rest I learned from this toot.
The ~ <space> trick I found out by trial and error, I think.
-
@phl Huh. I’m not sure I’ve seen a non-exotic (e.g, not for a Corne) layout which entirely lacks tilde as a discrete character. On my German keyboards, it’s on the AltGr layer of the +/* key. Same on Spanish QWERTY keyboards I’ve seen.
Not doubting that such a keyboard exists, I just thought I had seen most of the mass-produced layouts.
@bob_zim Hmm, tbf I'm not entirely sure if there's one with it missing (incidentally Spanish was the other layout I was suspicious of)... the deadkey aspect and it being hidden under layer 3 (and who knows if it's printed on the keyboard) definitely makes it more awkward and harder to type though than a Ctrl combination for example.
-
I could do that If I'd only connect from one device to a hand full of other devices. But that just doesn't work when you're doing work for customers.
Configuring that would be even harder than getting the key combination changed within the OpenSSH source code for everyone...