Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josbroers/ssh-connect
Easily connect to and manage your SSH connections.
https://github.com/josbroers/ssh-connect
linux scp server-tools ssh
Last synced: about 2 months ago
JSON representation
Easily connect to and manage your SSH connections.
- Host: GitHub
- URL: https://github.com/josbroers/ssh-connect
- Owner: josbroers
- License: mit
- Archived: true
- Created: 2022-10-24T16:40:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-05T00:09:49.000Z (almost 2 years ago)
- Last Synced: 2024-09-26T01:18:58.729Z (about 2 months ago)
- Topics: linux, scp, server-tools, ssh
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@josbroers/ssh-connect
- Size: 614 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SSH Connect
![npm](https://img.shields.io/npm/v/@josbroers/ssh-connect)
A package to easily connect and manage your SSH connections.
Note: the arguments are optional
## Table of contents
- [1. Node.js](#1-nodejs)
- [2. Configure](#2-configure)
- [3. Scripts](#3-scripts)
- [3.2 Aliases](#32-aliases)## 1. Node.js
First install the Node.js higher or equal to 16. Use the JavaScript Tool Manager [Volta](https://volta.sh/) or
the [Node Version Manager](https://github.com/nvm-sh/nvm).## 2. Configure
Before you can use this package as an executable you need to create a JSON file. Run the following command to create
this file:```bash
ssh-connect configure
```## 3. Scripts
#### To create a connections file, use:
```bash
ssh-connect configure
```#### To list all the defined connections, use:
```bash
ssh-connect list
```#### To connect to a listed connection, use:
```bash
ssh-connect connect
```#### To add a new connection, use:
```bash
ssh-connect add
```#### To remove a listed connection, use:
```bash
ssh-connect remove
```#### To edit a listed connection, use:
```bash
ssh-connect edit
```#### To get the IP-address of a listed connection, use:
```bash
ssh-connect get
```#### To list all the available aliases, use:
```bash
ssh-connect aliases
```### 3.2 Aliases
You can use aliases to predefine the type, connection:
```bash
alias ssh-con="ssh-connect connect $HOME/connections.json"
alias ssh-add="ssh-connect add $HOME/connections.json"
alias ssh-rm="ssh-connect remove $HOME/connections.json"
alias ssh-ls="ssh-connect list $HOME/connections.json"
alias ssh-edit="ssh-connect edit $HOME/connections.json"
alias ssh-get="ssh-connect get $HOME/connections.json"
alias ssh-alias="ssh-connect aliases $HOME/connections.json"
```You can take it even further by making aliases for specific connection names:
```bash
alias google="ssh-connect connect $HOME/connections.json google"
alias ssh-google="ssh-connect connect $HOME/connections.json google"alias cloudflare="ssh-connect connect $HOME/connections.json cloudflare"
alias ssh-cloudflare="ssh-connect connect $HOME/connections.json cloudflare"
```