The SSH directory ✨

Overview

Wishlist

Latest Release GoDoc Build Status

The SSH directory

screencast

With Wishlist you can have a single entrypoint for multiple SSH endpoints, whether they are Wish apps or not.

As a server, it can be used to start multiple SSH apps within a single package and list them over SSH. You can list apps provided elsewhere, too.

You can also use the wishlist CLI to list and connect to servers in your ~/.ssh/config or a YAML config file.

Usage

CLI

If you just want a directory of existing servers, you can use the wishlist CLI and a YAML config file. You can also just run it without any arguments to list the servers in your ~/.ssh/config. Check the example config file file as well as wishlist --help for details.

Library

Wishlist is also available as a library which allows you to start several apps within the same process. Check out the _example folder for a working example.

Auth

  • if ssh agent forwarding is available, it will be used
  • otherwise, each session will create a new ed25519 key and use it, in which case your app will be to allow access to any public key
  • password-based auth is not supported

Agent forwarding example

eval (ssh-agent)
ssh-add -k # adds all your pubkeys
ssh-add -l # should list the added keys

ssh \
  -o 'ForwardAgent=yes' \             # forwards the agent
  -o 'UserKnownHostsFile=/dev/null' \ # do not add to ~/.ssh/known_hosts, optional
  -p 2222 \                           # port
  foo.bar \                           # host
  -t list                             # optional, app name

You can also add this to your ~/.ssh/config, for instance:

Host wishlist
	HostName foo.bar
	Port 2222
	ForwardAgent yes
	UserKnownHostsFile /dev/null

Running it

Wishlist will read and store all its information in a .wishlist folder in the current working directory:

  • the server keys
  • the client keys
  • known hosts
  • config files

Config files may be provided in either YAML or SSH Config formats:

The config files are tried in the following order:

  • the -config flag in either YAML or SSH config formats
  • .wishlist/config.yaml
  • .wishlist/config.yml
  • $HOME/.ssh/config
  • /etc/ssh/ssh_config

The first one that is loaded and parsed without errors will be used. This means that if you have your common used hosts in your ~/.ssh/config, you can simply run wishlist and get it running right away. It also means that if you don't want that, you can pass a path to -config, and it can be either a YAML or a SSH config file.

Using the binary

wishlist

Using Docker

mkdir .wishlist
$EDITOR .wishlist/config.yaml # either an YAML or a SSH config
docker run \
  -p 2222:22 \
  -v $PWD/.wishlist:/.wishlist \
  docker.io/charmcli/wishlist:latest

Acknowledgments

The gif above shows a lot of Maas Lalani’s confeTTY.

Feedback

We'd love to hear your thoughts on this project. Feel free to drop us a note!

License

MIT


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source

Issues
  • I can't get this to work - kex_exchange_identification: Connection closed by remote host

    I can't get this to work - kex_exchange_identification: Connection closed by remote host

    Hi, When i try to connect ssh -o 'ForwardAgent=yes' -o 'UserKnownHostsFile=/dev/null' -p 2222 localhost I got an error kex_exchange_identification: Connection closed by remote host Config

    [email protected] > ~/wishlist > cat .wishlist/config.yaml
    listen: 127.0.0.1
    port: 2222
    
    endpoints:
    - name: xxx.xx
      address: xxx.xx:xxxx
      user: xxx
    
    users:
    - name: mcwnuq
      public-keys:
      - id_rsa
    

    Docker command docker run -p 2222:2222 -v $PWD/.wishlist:/.wishlist docker.io/charmcli/wishlist:latest

    PS: ssh-add -l 2048 SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+XXXXX /home/mcwnuq/.ssh/id_rsa (RSA)

    bug documentation 
    opened by mcwnuq 15
  • feat(deps): bump github.com/charmbracelet/bubbles from 0.9.0 to 0.10.0

    feat(deps): bump github.com/charmbracelet/bubbles from 0.9.0 to 0.10.0

    Bumps github.com/charmbracelet/bubbles from 0.9.0 to 0.10.0.

    Release notes

    Sourced from github.com/charmbracelet/bubbles's releases.

    v0.10.0

    Timer, stopwatch, bugfixes and quality-of-life improvements

    🎊 Happy New Year! This is a big release with a couple new components, a bunch of bug fixes, and some general quality-of-life improvements across the board.

    tl;dr

    New

    Changed

    Fixed


    Hungry for more? Here are the details.

    New: Timer

    @​caarlos0 added a simple timer Bubble for counting down.

    See the example code and docs for details.

    New: Stopwatch

    To match the timer, @​caarlos0 also added a simple stopwatch Bubble for counting up.

    See the example code and docs for details.

    Constructor Changes

    ... (truncated)

    Commits
    • 465a66e Add timer and stopwatch info to README
    • 7a728ea expose list.FilterMachesMsg (#77)
    • c426cb5 fix textinput infinite loop and panic
    • 48e3f85 Update keybindings after calling InsertItem on the list model
    • 5f256bf fix(list): update keybindings when setting items
    • eef9098 fix(list): check items slice len
    • b35f96c Deprecate NewModel() constructors; use New() instead
    • 9401ebb Viewport New() is now optional to ease the upgrade process
    • add13c8 Add a lipgloss style to the viewport for borders, margins, and padding
    • 4aed4e0 Viewport now has customizable keybindings
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • feat: reuse snapshot from meta

    feat: reuse snapshot from meta

    reuse from https://github.com/charmbracelet/meta/blob/main/.github/workflows/snapshot.yml

    enhancement 
    opened by caarlos0 1
  • feat: version flag

    feat: version flag

    closes #13

    enhancement 
    opened by caarlos0 1
  • Verifies if the selected item exists

    Verifies if the selected item exists

    What does this PR do?

    Adds a small check to avoid an exception that crashes the client when hitting enter when no items are available.

    https://user-images.githubusercontent.com/1270156/149637506-be1da8f1-47ac-41d9-878f-5974006539da.mp4

    An edge case, yes, but figured that avoids the crash and the client being disconnected, which provides a better UX overall.

    How should this be manually tested?

    With the patch, run the server, connect with a client and hit enter. It should not raise an exception neither the client should be disconnected.

    Any background context you want to provide?

    Complete log of the panic.

    2022/01/15 22:00:06 Using config from /etc/ssh/ssh_config
    2022/01/15 22:00:06 Starting SSH server for list on ssh://0.0.0.0:2222
    2022/01/15 22:00:08 kinduff connect 127.0.0.1:38484 false [] xterm-256color 44 29
    Caught panic:
    
    interface conversion: list.Item is nil, not *wishlist.Endpoint
    
    Restoring terminal...
    
    goroutine 36 [running]:
    runtime/debug.Stack()
    	/usr/lib/go/src/runtime/debug/stack.go:24 +0x65
    runtime/debug.PrintStack()
    	/usr/lib/go/src/runtime/debug/stack.go:16 +0x19
    github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func3()
    	/home/kinduff/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:350 +0x95
    panic({0x661a00, 0xc00008f2c0})
    	/usr/lib/go/src/runtime/panic.go:1047 +0x266
    github.com/charmbracelet/wishlist.(*listModel).Update(0xc0001f4900, {0x6814a0, 0xc00008f290})
    	/home/kinduff/www/wishlist/wishlist.go:63 +0x345
    github.com/charmbracelet/bubbletea.(*Program).StartReturningModel(0xc0001a6200)
    	/home/kinduff/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:534 +0x139c
    github.com/charmbracelet/bubbletea.(*Program).Start(...)
    	/home/kinduff/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:543
    github.com/charmbracelet/wishlist.listingMiddleware.func1.1({0x704f70, 0xc0001b4000})
    	/home/kinduff/www/wishlist/middleware.go:67 +0x345
    github.com/charmbracelet/wishlist.cmdsMiddleware.func1.1({0x704f70, 0xc0001b4000})
    	/home/kinduff/www/wishlist/middleware.go:27 +0xef
    github.com/charmbracelet/wish/logging.Middleware.func1.1({0x704f70, 0xc0001b4000})
    	/home/kinduff/go/pkg/mod/github.com/charmbracelet/[email protected]/logging/logging.go:22 +0x2af
    github.com/charmbracelet/wish/activeterm.Middleware.func1.1({0x704f70, 0xc0001b4000})
    	/home/kinduff/go/pkg/mod/github.com/charmbracelet/[email protected]/activeterm/activeterm.go:21 +0x4d
    github.com/gliderlabs/ssh.(*session).handleRequests.func1()
    	/home/kinduff/go/pkg/mod/github.com/gliderlabs/[email protected]/session.go:262 +0x2d
    created by github.com/gliderlabs/ssh.(*session).handleRequests
    	/home/kinduff/go/pkg/mod/github.com/gliderlabs/[email protected]/session.go:261 +0x514
    2022/01/15 22:00:08 127.0.0.1:38484 disconnect 392.756725ms
    
    bug 
    opened by kinduff 1
  • fix: improve config load error handling

    fix: improve config load error handling

    only ignore not found errors when trying multiple files... if it fails to parse, errors right away

    bug 
    opened by caarlos0 0
  • feat(deps): bump github.com/charmbracelet/bubbles from 0.10.1 to 0.10.2

    feat(deps): bump github.com/charmbracelet/bubbles from 0.10.1 to 0.10.2

    Bumps github.com/charmbracelet/bubbles from 0.10.1 to 0.10.2.

    Release notes

    Sourced from github.com/charmbracelet/bubbles's releases.

    v0.10.2

    Housekeeping

    🧹 This is a small release to improve the overall integrity of the viewport and textinput Bubbles.

    • Setting the width and height on a viewport’s style attribute is now a no-op. Previously it would produce some pretty confusing rendering and generally conflict with the Width and Height attributes on the model.
    • Fix a textinput regression where deleting words left of the cursor didn't actually do anything (courtesy @​IllusionMan1212)

    Full Changelog: https://github.com/charmbracelet/bubbles/compare/v0.10.1...v0.10.2


    Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Slack.

    Commits
    • 7ecce3f Ignore width/height settings in viewport's style settings
    • 746834a Add safety check in textinput's clamp
    • fd30652 Rename var in deleteWordRight in textinput for additional clarity
    • a4dc540 Re-add panic guard in deleteWordLeft in textinput, just in case
    • 151d102 fix(textinput): use old cursor pos and simplify logic
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • feat(deps): bump github.com/charmbracelet/bubbles from 0.10.0 to 0.10.1

    feat(deps): bump github.com/charmbracelet/bubbles from 0.10.0 to 0.10.1

    Bumps github.com/charmbracelet/bubbles from 0.10.0 to 0.10.1.

    Release notes

    Sourced from github.com/charmbracelet/bubbles's releases.

    v0.10.1

    Viewport Hotfixes

    This release fixes some viewport bugs introduced in v0.10.0:

    • Fixed a bug where the viewport's y-offset could be negative
    • Fixed an off-by-one error in GotoBottom()

    🤗 Special thanks to @​knipferrc and @​IllusionMan1212 for their assistance with the bugfixes.

    Also

    Full Changelog: https://github.com/charmbracelet/bubbles/compare/v0.10.0...v0.10.1


    Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Slack.

    Commits
    • daba232 Fix a bug where viewport y-offset could be negative
    • 7a6d306 Fix off-by-one error in viewport's GotoBottom()
    • 6c015a2 Remove an unused method
    • 764fd32 Cleanup an old var
    • 091c915 Fix various godoc comments
    • 505a16d Bump lipgloss and atotto/clipboard to their latest versions
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Publish nighlty builds on push to main only

    Publish nighlty builds on push to main only

    • Remove pr-comment workflow
    • Run goreleaser --snapshot on pr and push
    • Update readme
    opened by aymanbagabas 0
  • Add --version flag

    Add --version flag

    Add a --version flag that shows... the version.

    enhancement 
    opened by muesli 0
Releases(v0.1.3)
Owner
Charm
We build tools to make the command line glamorous
Charm
Grab is a tool that downloads source code repositories into a convenient directory layout created from the repo's URL's domain and path

Grab is a tool that downloads source code repositories into a convenient directory layout created from the repo's URL's domain and path. It supports Git, Mercurial (hg), Subversion, and Bazaar repositories.

Jeff Hodges 17 Dec 11, 2021
a command line tool for syncing a local directory to wnfs

wnfs-sync demo demo CLI application to syncronize a local filesystem directory to a public web-native file system directory. # get this binary, assume

Brendan O'Brien 6 Jul 30, 2021
lls is lightweight ls. Using lls, you can get a list of files in a directory that contains a large number of files.

lls lls is lightweight ls. Using lls, you can get a list of files in a directory that contains a large number of files. How? You allocate a buffer for

Tatsuya Kaneko 56 Nov 18, 2021
A simple CLI tool that identifies duplicate JARS in a directory. It can remove them also if desired.

Mendix Userlib Cleaner This little utility can be used to identify and clean duplicate JARs. It was created mainly for Mendix apps due to lack of form

CINAQ Internet Technologies 11 Dec 15, 2021
A go language implementation of a CLI, based on input directory files

A go language implementation of a CLI, based on input directory files, using tree output of all file names, based on input database links, dynamic reading of database table information, based on input swagger files to automate the generation of the RESTFUL API.

Eric 2 Nov 20, 2021
The go mod init command initializes and writes a new go.mod file in the current directory

go mod: The go mod init command initializes and writes a new go.mod file in the current directory, in effect creating a new module rooted at the curre

null 0 Nov 21, 2021
Go library for detecting and expanding the user's home directory without cgo.

go-homedir This is a Go library for detecting the user's home directory without the use of cgo, so the library can be used in cross-compilation enviro

Mitchell Hashimoto 1.2k Jan 14, 2022
Golang-based simple file server to serve files of the current working directory

fileserve Golang-based simple file server to serve static files of the current working directory File sharing in LAN or home network Web application t

Frank Hübner 2 Jan 9, 2022
Sync local file/directory to pod volume

Sync local file/directory to pod volume

null 0 Dec 16, 2021
Watcher - A simple command line app to watch files in a directory for changes and run a command when files change!

Watcher - Develop your programs easily Watcher watches all the files present in the directory it is run from of the directory that is specified while

Geet Sethi 0 Jan 2, 2022
📡 ssh into browser tab.

tabssh idk Uses TabFS and gilderlabs/ssh. Set your TabFS mount path in tabssh.go. $ go run tabssh.go and $ ssh -o StrictHostKeyChecking=no localhost

Omar Rizwan 59 Oct 7, 2021
Go Library to Execute Commands Over SSH at Scale

Go library to handle tens of thousands SSH connections and execute the command(s) with higher-level API for building network device / server automation.

Yahoo 764 Jan 12, 2022
SSH Lightweight management tools

tssh golang 实现的ssh 工具 安装 下载安装 下载地址 release windows用户请手动下载,暂时不提供一键安装模式( 主要是批处理脚本不会写 ) Mac一键安装 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.

lrs 119 Nov 11, 2021
ReverseSSH - a statically-linked ssh server with reverse shell functionality for CTFs and such

ReverseSSH A statically-linked ssh server with a reverse connection feature for simple yet powerful remote access. Most useful during HackTheBox chall

null 490 Jan 14, 2022
Go package for running Linux distributed shell commands via SSH.

Go package for running Linux distributed shell commands via SSH.

Disco 138 Jan 8, 2022
VSCode Remote-SSH and configuration sharing on WSL.

Wslssh Wslssh forwards SSH command from VSCode Remote-SSH to WSL and enables SSH configuration sharing. Quick Start Guide Download or compile wslssh a

Fadhli Dzil Ikram 0 Dec 2, 2021
The neph command installs, configures, and executes cloud setup software on a remote device using passwordless SSH with root privileges

The neph command installs, configures, and executes cloud setup software on a remote device using passwordless SSH with root privileges. Usage 1) nep

Read Write Pro 0 Dec 31, 2021
A simple single-file executable to pull a git-ssh repository and serve the web app found to a self-contained browser window

go-git-serve A simple single-file executable to pull a git-ssh repository (using go-git library) and serve the web app found to a self-contained brows

Justin Searle 0 Jan 19, 2022
Go driver for PostgreSQL over SSH. This driver can connect to postgres on a server via SSH using the local ssh-agent, password, or private-key.

pqssh Go driver for PostgreSQL over SSH. This driver can connect to postgres on a server via SSH using the local ssh-agent, password, or private-key.

mattn 48 Nov 23, 2021
Simple and lightweight SSH git hosting with just a directory.

go-gitdir This project makes it incredibly easy to host a secure git server with a config that can be easily rolled back. It aims to solve a number of

Kaleb Elwert 179 Dec 15, 2021
🤘 The native golang ssh client to execute your commands over ssh connection. 🚀🚀

Golang SSH Client. Fast and easy golang ssh client module. Goph is a lightweight Go SSH client focusing on simplicity! Installation ❘ Features ❘ Usage

Mohamed El Bahja 896 Jan 19, 2022
Extended ssh-agent which supports git commit signing over ssh

ssh-agentx ssh-agentx Rationale Requirements Configuration ssh-agentx Configuration ssh-gpg-signer Linux Windows Signing commits after configuration T

Wim 4 Dec 23, 2021
This is a SSH CA that allows you to retrieve a signed SSH certificate by authenticating to Duo.

github-duo-ssh-ca Authenticate to GitHub Enterprise in a secure way by requiring users to go through a Duo flow to get a short-lived SSH certificate t

Niels Hofmans 8 Jan 7, 2022
Golang `net/rpc` over SSH using installed SSH program

Golang net/rpc over SSH using installed SSH program This package implements a helper functions to launch an RPC client and server. It uses the install

null 0 Nov 5, 2021
Ssh-lxd - A proof of concept for an ssh server that spawns a bash session inside a LXD container

SSH LXD A proof of concept for an ssh server that spawns a bash session inside a

Henning Dahlheim 2 Jan 14, 2022
Go implementation of the XDG Base Directory Specification and XDG user directories

xdg Provides an implementation of the XDG Base Directory Specification. The specification defines a set of standard paths for storing application file

Adrian-George Bostan 160 Jan 9, 2022
Reload a specified go program automatically by monitoring a directory.

gowatcher A bash script to automatically reload a go program when .go or .html files change in the monitored directory. It uses inotify. Installation

Nick Janetakis 16 Jul 7, 2020
Go copy directory recursively

copy copy copies directories recursively. Example Usage err := Copy("your/directory", "your/directory.copy") Advanced Usage // Options specifies optio

Hiromu OCHIAI 376 Jan 14, 2022
Quickly clone an entire org/users repositories into one directory - Supports GitHub, GitLab, Bitbucket, and more

ghorg ghorg allows you to quickly clone all of an orgs, or users repos into a single directory. This can be useful in many situations including Search

Jay Gabriels 664 Jan 19, 2022