FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.

Overview

Connect quickly to your services 🚀



FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.

Installation

Download the latest release for your platform here, extract it and put it in a directory that is in your PATH (Packages managers coming soon). For example:

sudo cp fast-ssh /usr/bin/fast-ssh

If you use cargo you can run cargo install fast-ssh

Then you can launch Fast-SSH with fast-ssh.

Documentation

The default SSH configuration file should be located at ~/.ssh/config. If you already have an SSH configuration file with some hosts defined then you don't have to add anything, Fast-SSH just parses this file and displays it. If you don't have an SSH configuration file or you don't have any hosts defined within it then below is an example to help you set one up for use with Fast-SSH. Further information about the SSH configuration file can be found at this link: https://linuxize.com/post/using-the-ssh-config-file/

Host *
    UpdateHostKeys yes
    
Host Desktop                            # Name of host you want to connect to, for use with Fast-SSH.
    HostName 192.168.1.10               # Hostname using an IP address, this can be a public or private one.
    User YourCoolUsername               # Username for the host you want to SSH into.
    
Host Server                             # Name of host you want to connect to, for use with Fast-SSH.
    HostName 216.58.214.14              # Hostname using an IP address, this can be a public or private one.
    User YourCoolUsername               # Username for the host you want to SSH into.
    
Host AnotherServer                      # Name of host you want to connect to, for use with Fast-SSH.
    HostName example.com                # Hostname using a domain name.
    User YourCoolUsername               # Username for the host you want to SSH into.
    
Host RaspberyPi/Arch-Linux              # Defined group and name of host for use with Fast-SSH.
    HostName alarm-pi.local             # Hostname using a locally resolved address.
    User YourCoolUsername               # Username for the host you want to SSH into.
    
Host RaspberryPi/Raspbian               # Defined group and name of host for use with Fast-SSH.
    HostName raspbian.lan               # Hostname using a locally resolved address.
    User YourCoolUsername               # Username for the host you want to SSH into.

Fast-SSH has a group system. This allows you to sort your servers, for example, by project, mission or client. To make some groups, it's simple, just define your Host as Group/ServerName (see full configuration in above example) and your groups will be displayed in FastSSH. You can now select a group and display only the servers defined in that group. Now all you have to do is launch Fast-SSH, select your service and press enter to connect.

File Database

A file database is stored at $XDG_CONFIG_HOME/FastSSH/db.ron ( %APPDATA%/FastSSH/db.ron for Windows ).

This file is automatically created when you launch Fast-SSH. This database is used to store the number of connections to a service and the date of last connection.

Search Mode

Fast-SSH implements a search mode ( fuzzy ) that allows you to type to find one of your hosts. To use it, press s, start typing, finish your selection with the arrow keys then press enter once the host is selected to make the SSH connection. Press ESC if you wish to leave the search mode and return to the "groups" mode.

Shortcuts

Key Action
h Display Shortcuts Panel
Enter Validate selection : Execute SSH cmd
Tab/BackTab Navigate through your groups
Left/Right Navigate through your groups
Up/Down Navigate through your hosts
c Switch Config display mode
PageUp/Down Scroll Configuration
s Enable Search Mode
Esc Exit Search Mode
q Exit Fast-SSH

Configuration

Fast-SSH has a few configuration options. You can find the configuration in :

  • Unix : $XDG_CONFIG_HOME/FastSSH/config.yaml
  • Windows : %APPDATA%/FastSSH/config.yaml
# This is the default configuration for FastSSH.

theme:
    text_primary: "#b967ff"
    text_secondary: "#ffffff"
    border_color: "#b967ff"

Known issues

If you are a user of the new Windows terminal and you encounter raw AINSI escape sequences when you run fast-ssh, you must unset the TERM environment variable before running the application. Read more about this here : https://github.com/crossterm-rs/crossterm/issues/580

Best solution would be to create an alias like this :

alias fast-ssh="TERM= fast-ssh"
Comments
  • Custom layouts

    Custom layouts

    I think this is apart of a larger epic of multiple issues (or milestone?) that goes into this. But basically, allow the user to define a custom layout based on common elements. I'm not sure on the file structure of this in a config file, but that is something that can be ironed out. User should be able to define what row they start in or column. I'm not sure what the best way for this would be with a more static approach with defining the row/col or more dynamic defining just an order and size (percentage maybe?) and calculating that and where they should be. Granted I think it should allow for white space or bigger gaps between elements if a user desires.

    enhancement 
    opened by hockeymikey 5
  • Complains about a valid SSH config property

    Complains about a valid SSH config property

    Hi, first of all, thank you for the tool, looks very good

    One issue I have is that it's complaining about the PubkeyAcceptedKeyTypes property I've set for a server in my SSH config file. This is a valid property in SSH config, so I think even if the tool doesn't use that property, it's good to not error out

    Thank you

    bug 
    opened by farzadmf 5
  • Panic on program start

    Panic on program start

    When trying to start fast-ssh from the command line using fast-ssh it fails and freezes the terminal, I am trying this on Fedora 34 and have tested both the downloadable tar.gz file from the latest release (v0.2.1) as well as via the cargo install fast-ssh method. I have run the command with RUST_BACKTRACE=full as suggested and have provided the output below.

    EDIT: Downgrading to an earlier version (v0.2.0) fixes the issue.

    $ RUST_BACKTRACE=full fast-ssh > backtrace
    thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /home/hreikin/.cargo/registry/src/github.com-1ecc6299db9ec823/fast-ssh-0.2.1/src/app.rs:67:10
                                                                                                                                                                                   stack backtrace:
                                                                                                                                                                                                      0:     0x559d745f8b80 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb81dd1a78bb96f60
                                                                                       1:     0x559d7461a5dc - core::fmt::write::h205940cafbb98a3d
                                                                                                                                                     2:     0x559d745f48f5 - std::io::Write::write_fmt::h4d30a65b89df279f
                                                                                                                                                                                                                            3:     0x559d745fa80b - std::panicking::default_hook::{{closure}}::h3c5425a3f4b5ee21
                                                                     4:     0x559d745fa380 - std::panicking::default_hook::h7c2827a5a7a96663
                                                                                                                                               5:     0x559d745faee4 - std::panicking::rust_panic_with_hook::hceee634f9d20b4f1
                                                                                                                                                                                                                                 6:     0x559d745fa9b0 - std::panicking::begin_panic_handler::{{closure}}::h7de468b3df6750a8
                                                                                 7:     0x559d745f9044 - std::sys_common::backtrace::__rust_end_short_backtrace::h87b00be28d10817a
                                                                                                                                                                                     8:     0x559d745fa919 - rust_begin_unwind
                                                                                                                                                                                                                                 9:     0x559d74554291 - core::panicking::panic_fmt::h29a3e96afa0a0daa
                                                          10:     0x559d74554252 - core::panicking::panic_bounds_check::h8ecc421189d7d0f8
                                                                                                                                           11:     0x559d7456d623 - fast_ssh::app::App::get_items_based_on_mode::h189e8b590dbebaa5
                                                                                                                                                                                                                                    12:     0x559d7455a0e5 - fast_ssh::widgets::hosts_widget::HostsWidget::render::ha6b60b69a568cd08
                                                                                        13:     0x559d7455f44a - tui::terminal::Terminal<B>::draw::hb733d0ac6f0e10f8
                                                                                                                                                                      14:     0x559d7456845e - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::ha27021561155e11e
                                                        15:     0x559d7455ca5f - tokio::park::thread::CachedParkThread::block_on::hf6c8bc90ccaeb030
                                                                                                                                                     16:     0x559d7455cbbe - tokio::runtime::thread_pool::ThreadPool::block_on::h7f84fdd4a7709496
                                                                                                                                                                                                                                                   17:     0x559d7456ed38 - tokio::runtime::Runtime::block_on::h68ec888ceb8f60e5
                                                                                    18:     0x559d7456dba4 - fast_ssh::main::he09aef1402a62e66
                                                                                                                                                19:     0x559d7455b6c3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h74eefc0530100569
        20:     0x559d74569dad - std::rt::lang_start::{{closure}}::hedf0d1c98cec7b9e
                                                                                      21:     0x559d745fb4ea - std::rt::lang_start_internal::ha108655af4bf2480
                                                                                                                                                                22:     0x559d7456dc92 - main
                                                                                                                                                                                               23:     0x7ff65671eb75 - __libc_start_main
                                                                                                                                                                                                                                           24:     0x559d74554a0e - _start
                              25:                0x0 - <unknown>
    
    bug 
    opened by hreikin 5
  • Minor documentation change

    Minor documentation change

    Hi, sorry for the second merge request i was hoping to get it on the initial one before it got merged. This is a very minor change that moves the installation instructions to the top of the README and provides an example of copying the file into a users PATH.

    opened by hreikin 1
  • Panic when ~/.ssh/config does not exist

    Panic when ~/.ssh/config does not exist

    When running fast-ssh on a machine that does not have an account local ssh config, the application will crash with the following error: thread 'main' panicked at 'Failed to parse ~/.ssh/config: SshConfigRead { path: "C:\\Users\\[redacted]\\.ssh\\config", error: Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." } }', C:\Users\[redacted]\.cargo\registry\src\github.com-1ecc6299db9ec823\fast-ssh-0.1.3\src\ssh_config_store.rs:32:14

    Referenced line: https://github.com/Julien-R44/fast-ssh/blob/419bc1b094f5cf0e6a77bd5241f48f8b43e7353c/src/ssh_config_store.rs#L32

    bug 
    opened by pantsman0 1
  • fast-ssh doesn't properly handle multiple hostnames

    fast-ssh doesn't properly handle multiple hostnames

    Host can have aliased hostnames, so with my config like this

    Host short_hostname long_hostname
      HostName ...
      User ...
      ...
    

    The error comes back as ssh: Could not resolve hostname short_hostname long_hostname: No such host is known. instead of using only one of the hostnames.

    This is a nice project though!

    bug 
    opened by Cpapa97 1
  • Element navigation

    Element navigation

    Related to https://github.com/Julien-R44/fast-ssh/issues/18 since this would tie into a custom layout. I desire to be able to define say two host columns (one for one group, another for a different one). And instead of the left and right navigating the groups element and being locked to it, it would navigate between the elements so I could go between the two lists navigating them up and down (or more if I have other columns).

    opened by hockeymikey 0
  • Spawn new window for SSH connection

    Spawn new window for SSH connection

    Right now fast-ssh exits after starting ssh session. This means that fasy-ssh needs to be started for every connection.

    It would be nice if fast-ssh could start an separate process for SSH connection, leaving the main process running.

    opened by szuro 0
  • Doesn't support config.d

    Doesn't support config.d

    A valid usage of ssh config files is includeing a directory of configs: include ~/.ssh/config.d/*

    fast-ssh complains that the config is invalid:

    SSH configuration contains the following errors:
    
    * SSH option `Include` provided before `Host` is specified.
    

    Moving the include line to the end of the file then includes it with the last host in the config which is undesired behaviour.

    A suggested behaviour could be to treat files in config.d as groups, I use config.d files to keep customer devices out of my main config which keeps the main config cleaner and allows me to share specific customer configs with team mates.

    enhancement 
    opened by mplinuxgeek 5
  • Issue with SFTP URIs and grouped hosts

    Issue with SFTP URIs and grouped hosts

    Hello @Julien-R44,

    and thanks for the beautiful fast-ssh TUI app!

    I'd like especially the possibility to group the various hosts just prefixing them with a word/string and a slash:

    Host Development/alpha
        Hostname 1.2.3.4
        User superman
        IdentityFile /keys/personal.pem
        ServerAliveInterval 60
    

    The only issue I'm facing is with nautilus SFTP URI bookmarks. For example the above host would translate into an invalid:

    sftp://Development/alpha/home/superman
    

    The ugly workaround I found this far is to add a second Host reference to the first one in the ~/.ssh/config:

    Host Development/alpha
    Host alpha
        Hostname 1.2.3.4
        User superman
        IdentityFile /keys/personal.pem
        ServerAliveInterval 60
    

    In order to let me correctly reference the host in SFTP URIs:

    sftp://alpha/home/superman
    

    Do you know by any chance how to escape Development/alpha?

    Thanks in advance

    enhancement 
    opened by lanceschi 5
Releases(v0.3.1)
Owner
Julien
Julien
Terminal UI for leetcode. Lets you browse questions through different topics. View, solve, run and submit questions from TUI.

Leetcode TUI Use Leetcode in your terminal. Why this TUI: My motivation for creating leetcode-tui stemmed from my preference for tools that are lightw

Akarsh 8 Aug 10, 2023
Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past

Jumpy Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past. It is heavily inspired by Zoxide but is more lig

Clément Nerma 2 Oct 3, 2022
tmplt is a command-line interface tool that allows you to quickly and easily set up project templates for various programming languages and frameworks

tmplt A User Friendly CLI Tool For Creating New Projects With Templates About tmplt is a command-line tool that lets users quickly create new projects

Humble Penguin 35 Apr 8, 2023
Facilitates navigating between tmux and nvim with C-hjkl

neovim-tmux-navigator Usage Use C-<hjkl> to navigate left, down, up, right, respectively. neovim-tmux-navigator will switch between vim splits and tmu

Amiel Martin 1 Dec 2, 2021
A tool for navigating and reorganizing Jiu Jitsu instructionals

Hackers Guide to Jiu Jitsu: The Application A tool watching and navigating Jiu Jitsu instructionals. Features: Scene detection Scene title recognition

Ioannis Canellos 6 Aug 20, 2022
Navigating around TUM with excellence – An API and website to search for rooms, buildings and other places

NavigaTUM NavigaTUM is a non-official tool developed by students for students, that aims to help you get around at TUM. Feel free to contribute. Featu

TUM Developers 21 Dec 22, 2022
A fast, simple TUI for interacting with systemd services and their logs

systemctl-tui A fast, simple TUI for interacting with systemd services and their logs. systemctl-tui can quickly browse service status and logs, and s

Reilly Wood 11 Sep 1, 2023
Sero is a web server that allows you to easily host your static sites without pain. The idea was inspired by surge.sh but gives you full control.

sero Lightning-fast, static web publishing with zero configuration and full control ?? Table Of Contents ?? Table Of Contents ?? Tools ❓ About The Pro

Dmitry Miasnenko 6 Nov 13, 2023
A template for bootstrapping a Rust TUI application with tui-rs & crossterm

rust-tui-template A template for bootstrapping a Rust TUI application with tui-rs & crossterm. tui-rs The library is based on the principle of immedia

Orhun Parmaksız 72 Dec 31, 2022
A filesystem driver that allows you to view your Blackboard course contents as if they were normal files and folders on your system!

BlackboardFS Blackboard: noun A website so bad that it might as well be a network drive. BlackboardFS is a filesystem driver that allows you to view y

null 22 Sep 4, 2023
The dead easy way to use config files in your rust project

Configr The dead easy way to use config files in your project This will load a config.toml file if it exists, otherwise it will create the needed fold

Carsten Kragelund Jørgensen 4 Jul 1, 2022
🕺 Run React code snippets/components from your command-line without config

Run React code snippets/components from your command-line without config.

Eliaz Bobadilla 11 Dec 30, 2022
bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language

bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language. Currently, only Rhai is supported, but more languages may be added in the future.

Jarosław Konik 7 Jun 24, 2023
A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

Vagelis Prokopiou 4 Aug 14, 2022
A rust library + CLI tool that tells you when swas will upload new video through complex calculations

A rust library + CLI tool that tells you when swas will upload new video through complex calculations. It also lets you search and play youtube videos of swas and other channels. Searching about youtube channels is also an option. Basically it's a youtube search cli tool written in rust.

midnightFirefly 4 Jun 10, 2022
Koi is a simple tool built to let you use ChatGPT through the command line

Koi is a simple tool built to let you use ChatGPT through the command line. It adds the ability to let ChatGPT run commands on your computer in order to help you out, or to help you out with complicated tasks.

Shivam Sharma 9 Mar 28, 2023
OSINT from your favorite services in a friendly terminal user interface

osintui Open Source Intelligence Terminal User Interface Report Bug · Request Feature Installation First, install Rust (using the recommended rustup i

Will Sheldon 639 Jan 4, 2023
Introducing Inlyne, a GPU powered yet browsless tool to help you quickly view markdown files in the blink of an eye.

Inlyne - a GPU powered, browserless, markdown + html viewer inlyne README.md --theme dark/light About Markdown files are a wonderful tool to get forma

null 308 Jan 1, 2023
Tool that was built quickly for personal needs, you might find it useful though

COPYCAT Produced with stable-diffusion Clipboard (copy/paste) history buffer for terminal emulators, MAC OS gui and VIM* environment usage. Rrequireme

Dragan Jovanović 4 Dec 9, 2022