Git Product home page Git Product logo

fast-ssh's People

Contributors

gschizas avatar hreikin avatar ironicbadger avatar julien-r44 avatar mfrischknecht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fast-ssh's Issues

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>

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.

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

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!

Theming

It would be nice to be able to theme it with even something as simple as different accent color.

cargo install build fail - MacOS

Hi,
When trying to instal fast-ssh on MacOS I'm getting this eror:

   Compiling fast-ssh v0.3.1
libunwind: malformed __unwind_info at 0x18D5DBCA8 bad second level page
error[E0283]: type annotations needed
  --> /Users/lukaschleba/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fast-ssh-0.3.1/src/layout.rs:60:10
   |
60 |         .constraints(constraints.as_ref())
   |          ^^^^^^^^^^^             ------ type must be known at this point
   |          |
   |          cannot infer type of the type parameter `C` declared on the method `constraints`
   |
   = note: multiple `impl`s satisfying `Vec<Constraint>: AsRef<_>` found in the `alloc` crate:
           - impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
             where A: Allocator;
           - impl<T, A> AsRef<[T]> for Vec<T, A>
             where A: Allocator;
help: consider specifying the generic argument
   |
60 |         .constraints::<&T>(constraints.as_ref())
   |                     ++++++

libunwind: malformed __unwind_info at 0x18D5DBCA8 bad second level page
libunwind: malformed __unwind_info at 0x18D5DBCA8 bad second level page
For more information about this error, try `rustc --explain E0283`.
error: could not compile `fast-ssh` (bin "fast-ssh") due to 1 previous error
error: failed to compile `fast-ssh v0.3.1`, intermediate artifacts can be found at `/var/folders/z9/07kmnt4s1314rnh6rfx6hm8w0000gn/T/cargo-install6AlVoO`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

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.

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.

Element navigation

Related to #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).

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.