GNOME Bugzilla – Bug 577801
hotssh should not alias ssh
Last modified: 2014-10-24 20:50:14 UTC
I would much better that hotssh did not alias ssh to hotssh - I often find this annoying - I would prefer to choose myself when I use hotssh and when I want to use simple ssh alone. Could you please drop the profile.d files or at least make it easy to disable with an envvar say?
Hmm I guess I would have read the profile.d file already: guess I just need to define ssh myself then. I am still not sure that the alias is such a good idea though, but maybe more people vote the other way?
# for bash and zsh, only if no alias is already set alias ssh >/dev/null 2>&1 || alias ssh='hotssh --bg' For bash at least this is slightly misleading perhaps since users' config files will be read after "/etc/profile*" I think, though generally overriding later in ~/.bashrc should be good enough.
I'm coming around on this one...I guess as long as we have a FAQ for how to do the alias, the target audience is technical enough to know how to do it. Note though I did fix a bug in 0.2.6 that made the ssh alias a lot more reliable.
I had 2 suggestions on this. 1: If solving with documentation, instead of telling people they need to create an alias in their .bashrc to prevent this, why not tell them to add "unalias ssh" to their .bashrc file? Making an alias of ssh back to ssh seems redundant. (tested and works) 2: Instead of providing just a documented solution, why not make it a configuration preference? One method of enabling the switch would be to add the following to /etc/profile.d/hotssh.sh, preferably anywhere before the last line that sets the alias (tested and works): # If the user has set to not alias ssh to hotssh, # which is done through the interface or creating ~/.hotssh/noalias # then exit before aliasing [ -f ~/.hotssh/noalias ] && return Just my thoughts. The only reason I'm a fan of a fix for this is that the bugs that have open connections make it where I have to not use hotssh to some of my clients' machines, they kinda freak out a bit. Otherwise I wouldn't necessarily care.
I dunno I still think the default should no alias. If users want it they can just "alias ssh hotssh". Making people hunt around for unalias is unfriendly. Stealing ssh is non-intuitive and users should run hotssh not ssh to get hotssh.
Also see https://bugzilla.redhat.com/show_bug.cgi?id=528223 Thanks for removing it in http://git.gnome.org/browse/hotssh/commit/?id=e4aeeb6cc1597bb7c518906f04902e601dc7a166