A Gnome Shell extension which searches the ssh config and known_hosts file and provides the found ssh connections in your shell overview.
This project is a fork of the gnome-shell-extension-sshsearch project which has been unmaintained for a while.
-
It parses
~/.ssh/config
,/etc/ssh/ssh_config
and/etc/ssh_config
files (if they exist) and searches for host names. -
It parses
~/.ssh/known_hosts
,/etc/ssh/ssh_known_hosts
and/etc/ssh_known_hosts
files (if they exist) and reads all host names (to use this feature you have to set the ssh setting "HashKnownHosts" to "no"). -
You can prepend a host name with a user name as in
user@host
.
SSH Search Provider Reborn comes with a preference panel which can be found from the "Tweaks" application or the Gnome Shell Extensions page.
The Arguments and Pass SSH command line as a single argument parameters are automatically filled if the picked Terminal Application is one of the following supported applications:
-
Gnome Terminal (
org.gnome.Terminal.desktop
, the default) -
Guake (
guake.desktop
) -
RXVT (
rxvt.desktop
) -
Tilix (
com.gexperts.Tilix.desktop
) -
XTerm (
xterm.desktop
)
If the configured Terminal Application's .desktop
file cannot be
found, the extension falls back to using the
org.gnome.desktop.applications.terminal.exec
and
org.gnome.desktop.applications.terminal.exec-args
dconf keys. You
can set them up as described in the documentation for the extension
version
3.
Assume the ~/.ssh/config file looks like:
Host desktop
User user
HostName 192.168.1.100
Host desktop1
User user
HostName 192.168.1.101
host vserver
User user
Port 2222
HostName 11.11.111.111
and the ~/.ssh/known_hosts file looks like:
[11.11.111.111]:2222 ssh-rsa AAAAB...
github.com,207.97.227.239 ssh-rsa AAAAB...
user.webfactional.com,22.22.222.222 ssh-rsa AAAAB...
192.168.1.100 ssh-rsa AAAAB...
Here are some example searches and the search results:
-
search-term: desk
- desktop
- desktop1
-
search-term: rv
- vserver
-
search-term: 11
- 11.11.111.111:2222
-
search-term: 97
- 207.97.227.239
-
search-term: user@ (all host names are in the search results)
- user@desktop
- user@desktop1
- user@vserver
- user@11.11.111.111:2222
- user@github.com
- user@207.97.227.239
- user@user.webfactional.com
- user@22.22.222.222
- user@192.168.1.100
-
search-term: user@des
- user@desktop
- user@desktop1
SSH Search Provider Reborn is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/].
Install directly from the Gnome Shell Extensions site.
Or download the zip file from the GitHub releases page and run:
gnome-extensions install ssh-search-provider@extensions.gnome-shell.fifi.org.v18.shell-extension.zip
- meson v1.4.0 or later.
-
Check out:
git clone --recurse-submodules https://github.com/F-i-f/ssh-search-provider
-
cd ssh-search-provider
-
Run meson:
meson setup build
-
To install in your your gnome shell extensions' directory (~/.local/share/gnome-shell/extensions), run ninja:
ninja -C build install
-
To build the extension zip files, run:
ninja -C build extension.zip
, the extension will be found underbuild/extension.zip
.
- Gnome Shell 47 compatibility.
- Opens the Guake overlay window when starting an SSH session. Contributed by Victor Westerhuis viccie30@users.noreply.github.com.
- Update meson-gse:
- Now requires meson 1.4.0 or later.
- Build now runs eslint on test, added prettier target.
- Update to pass eslint.
- Code ran through prettier.
- Gnome Shell 46 compatibility.
- Provide defaults for Gnome Console.
- Bugs fixed.
- Code improved thanks to Gnome Shell code review.
- Gnome Shell 45 compatibility.
- Now incompatible with all older Gnome Shell lower than 45.
- Version 13 works for Gnome Shell 43 and 44.
- Version 11 works for Gnome Shell 32 through 42.
- Gnome Shell 44 compatibility.
- Update meson-gse:
- js102 support
- Gnome Shell 43 compatibility.
- Now incompatible with all older Gnome Shell lower than 43. Version 11 still works fine for these older installations.
- Update meson-gse:
- js91 support
- Support meson 0.61 and later when building.
- Gnome Shell 42 compatibility.
- Update instructions to use
gnome-extensions
instead of manually unzipping.
- Declare compatibility with version 40 and 41 of Gnome Shell instead of using minor versions (40.0 and 41.1). This should clear reports of the extension being incompatible with well-supported versions.
- Drop compatibility with Gnome Shell 3.28 and 3.30 (which do not have getSettings/initTranslations in ExtensionUtils).
- Update meson-gse:
- Fix build issues with meson 0.60.0.
- Bump minimum meson version to 0.50.0.
- Clean up code:
- Remove Lang imports.
- Use ExtensionUtils for getSettings/initTranslations instead of using meson-gse's convenience.js.
- Drop old Gnome Shell 3.28 compatibility code.
- Gnome Shell 41 compatibility.
- Update meson-gse to latest:
- Bug fix for preferences logging.
- Add Dutch translation (courtesy of @Vistaus).
- Gnome-shell 40.0 compatibility.
- Update extensions for Gnome-Shell 40.0.
- Update preferences for Gtk4.
- Update meson-gse to latest:
- Now prints the GJS version in the system log at start-up (if debug is enabled).
- Support more mozjs version (78, 68, 52) for build-time syntax
checks (
ninja test
).
- Declare gnome-shell 3.38 compatibility (no code changes required).
- Declare gnome-shell 3.36 compatibility (no code changes required).
- Fix deprecation warning in preferences.
- Update meson-gse to latest.
- Now prints the gnome-shell version and the session type on start-up.
- Declare compatibility with shell versions 3.33.90 and 3.34 (no code changes required).
- Added Travis CI support in build tree.
- Added license in README.md.
This is a complete overhaul of the extension.
New features:
-
Preference panel for configuring the preferred terminal application.
-
Supports literal IPv6 hosts.
-
Supports gnome-shell 3.28 (and potentially older versions) (GitHub Issue #3).
-
Fully handle terminal emulators other than Gnome Terminal. Sensible defaults are provided for: Gnome Terminal, Guake, RXVT, Tilix and XTerm, but any other terminal emulator can be used.
-
Also parse and monitor
/etc/ssh_config
and/etc/ssh/ssh_config
, if they exist. -
If the any of the ssh configuration files is a symbolic link, the link target is also monitored for changes.
-
Added debug logging (configurable in preferences).
-
Faster (sub-)search.
-
Internationalized, french translation.
Changes:
-
The results now appear under the "SSH" Gnome Shell overview heading (used to be the name of the terminal emulator application).
-
~/.ssh/known_hosts
(and related) entries containing ports (eg.[localhost]:1234
) are now displayed (and can be searched) by using the bracketed syntax. This allows for parsing ports in IPv6 literal addresses correctly. -
The Terminal Emulator arguments must be fully specified for Gnome Terminal (the extension used to silently inject the
--command
switch, not anymore). -
Use Subset search when applicable to speed-up searching.
-
Almost complete under-the-hood re-implementation.
Bugs fixed:
-
No more hidden dependencies on Gnome Terminal (GitHub Issue #2).
-
Don't drop/recreate settings and settings signals when the terminal emulator application is changed.
-
Ignore wildcards when parsing the
~/.ssh/config
(and related) files. -
Fix terminal emulator command line when launching an host of the form
user@host:port
. -
Don't allow completing
@host
(no user part). -
Don't give completions until at least one letter of the host name is entered (otherwise
user@
would display all possible hosts). -
Icons are now the same in the overview search heading and the individual search results.
-
Avoid re-parsing the files needlessly (better filtering of Gio.file.monitor_file() events).
- The host names read from
~/.ssh/config
are not coerced to lower-case.
-
ES6 / Gnome-Shell 3.32 compatibility (still compatible with 3.30 and lower).
-
Updated meson-gse to latest.
-
Minor doc updates.
- First release, based upon the original.
-
The
meson-gse
credits are included here by reference. -
Bernd Schlapsi brot@gmx.info for the original extension.