Skip to content

Alopex4/ssx

This branch is 3 commits ahead of, 114 commits behind vimiix/ssx:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 11, 2024
d4c5c3e Β· Jan 11, 2024

History

46 Commits
Dec 15, 2023
Jan 11, 2024
Jan 9, 2024
Jan 11, 2024
Dec 14, 2023
May 5, 2023
May 5, 2023
Dec 8, 2023
May 5, 2023
Dec 17, 2023
Dec 20, 2023
Jan 10, 2024
Jan 10, 2024
Jan 10, 2024
Dec 20, 2023

Repository files navigation

πŸ¦… ssx is a retentive ssh client.

It will automatically remember the server which login through it, so you do not need to enter the password again when you log in again.

Getting Started

Installation

Download binary from releases, extract it and add its path to your $PATH list.

If you want to install from source code, you can run command under project root directory:

make ssx

then you can get ssx binary in dist directory.

Add a new entry

ssx [-s] [USER@]HOST[:PORT] [-k IDENTITY_FILE]

If given address matched an exist entry, ssx will login directly.

List exist entries

ssx list
# output example
# Entries (stored in ssx)
#  ID |       Address        |          Tags
#-----+----------------------+--------------------------
#  1  | [email protected]:22  | centos

ssx does not read ~/.ssh/config by default unless the environment variable SSX_IMPORT_SSH_CONFIG is set. ssx will not store user ssh config entries to itself db, so you won't see their ID in the output of the list command

export SSX_IMPORT_SSH_CONFIG=true
ssx list
# output example
# Entries (stored in ssx)
#  ID |       Address        |          Tags
#-----+----------------------+--------------------------
#  1  | [email protected]:22  | centos
#
# Entries (found in ssh config)
#               Address              |           Tags
# -----------------------------------+----------------------------
#   [email protected]:22            | github.com

Tag an entry

ssx tag -i <ENTRY_ID> [-t TAG1 [-t TAG2 ...]] [-d TAG3 [-d TAG4 ...]]

Once we tag the entry, we can log in through the tag later.

Login

If more than one flag of -i, -s ,-t specified,

priority is ENTRY_ID > ADDRESS > TAG_NAME

If not specified any flag, ssx will treat the second argument as a keyword for searching from host and tags, if not matched any entry, ssx will treat it as a new entry, and try to login.

# login by interacting, just run ssx
ssx

# login by entry id
ssx -i <ID>

# login by address, support partial words
ssx [-s] <ADDRESS>

# login by tag
ssx [-t] <TAG>

Delete an entry

ssx delete -i <ENTRY_ID>

Supported environment variables

  • SSX_DB_PATH: DB file to store entries, default is ~/.ssx.db.
  • SSX_CONNECT_TIMEOUT: SSH connect timeout, default is 10s.
  • SSX_IMPORT_SSH_CONFIG: Whether to import the user ssh config, default is empty.

Copyright

Β© 2023 Qian Yao

Distributed under the MIT License. See LICENSE file for details.

About

πŸ¦… ssx is a retentive ssh client.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.8%
  • Makefile 3.2%