How to disable bell on SSH connections
-
@networknotwork hold - you might be right ;) stupid me was hitting enter not backspace..
doh! Well shit! ;)
sorry about that - need more coffee I guess ;)
-
@networknotwork ok I think I got it ;)
in your .tcshrc file at the end add
set nobeep
this seems to have done it.
tested with ssh that is part of windows
C:\>ver Microsoft Windows [Version 10.0.19044.1415] C:\>ssh -V OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
Or if you like your file to be a bit cleaner looking in the area where its setting prompt and stuff you could add the nobeep
-
@johnpoz not at my PC but this sounds right, so dang difficult to find stuff specific for tcsh/FreeBSD, just get a deluge of bash/Linux hits…I literally googled (well, DDG’ed) “disable tcsh bell” and didn’t find this.
-
@networknotwork btw, I tested this with ssh from openssh for windows as well, and it still works - since its related to the shell (tcsh)
C:\>ssh -V OpenSSH_8.8p1, OpenSSL 1.1.1l 24 Aug 2021
Not sure why the windows built in ssh is so far behind..
Just got a fancy new PC, and still working on getting all the stuff back to the way I like it.. Upon testing this and seeing that the windows version ssh that comes with was so far behind it was time to correct that ;) I normally just use securecrt for my ssh needs, but now and then you need to do stuff from just the command line
-
@networknotwork said in How to disable bell on SSH connections:
difficult to find stuff specific for tcsh/FreeBSD
It's here https://www.freebsd.org/cgi/man.cgi?tcsh(1).
I've been looking for the beep one myself quiet often, and was thrown of track because what the first line in /etc/passws says : your shell is /bin/sh
But ... when 'root' (or 'admin') logs in, /bin/sh uses /root/.profile that will kick of /etc/rc.initial. rc.initial shows the 'asccii pfsense' menu.
Option 8 of this script will kick of another shell, this time /bin/tcshBtw : files like /root/.tcshrc will get overwritten what updating / upgrading and maybe during other circumstances.
-
@gertjan said in How to disable bell on SSH connections:
files like /root/.tcshrc will get overwritten what updating / upgrading and maybe during other circumstances.
quite true.. so need to keep that in mind going forward.
-
@johnpoz maybe you guys should just add this to the default .tcshrc :-) I doubt anyone likes the bell!
-
@gertjan I think /bin/sh in passwd is there for some weird compatibility/historical reasons; it’s usually symlinked to another shell like tcsh/bash in the file system, I don’t think any distro still uses the original sh; the default on FreeBSD is tcsh
-
@networknotwork said in How to disable bell on SSH connections:
I doubt anyone likes the bell!
hehehe - you never know ;) But sure you could put in a feature request to have that as an option you could turn off or on in the gui..
They have it where you can turn off the bootup/shutdown beep
I would think they could add a option where you configure ssh access to disable that beep ;)
-
@networknotwork said in How to disable bell on SSH connections:
I don’t think any distro still uses the original sh
Think again.
dump /bin/sh yourself.
The binary will ID itself to you.
It no sym link.It's 'sh'.
-
@johnpoz is there a feature request/bug report board? Couldn't find one. Anway, while editing .tcshrc I found a bug: it checks for
$term == "xterm"
to set key bindings, it should be$term =~ "xterm"
to account for xterm-256color etc.Command line editing wasn't working properly before I made this change, inserting appeared like it was overwriting (not pushing rest of line to the right as I typed) but was actually inserting my typed chars into the line.
-
@gertjan yeah, pfsense is the exception that proves the rule!
-
@networknotwork you can create a feature request over on https://redmine.pfsense.org/
And if you found a bug/issue or improvement in the .tcshrc you could put that in there as well.
edit: This has been a enlightening thread to be sure.. I learned a bit about making sure your actually awake when testing something ;) and also about the stupid bell thing hehe, and got me to update my local ssh client too.