npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sc-ssh

v1.0.5

Published

Automate SSH key setup and configuration

Downloads

7

Readme

sc-ssh

Automate SSH key setup and configuration

sc-ssh is a command-line tool that simplifies SSH key management and server configuration. It automates the process of generating SSH keys, copying them to remote servers, and updating your SSH config file, enabling password-less connections with a single command.



Features

  • Interactive Setup: Guided prompts for configuring SSH access to new servers
  • Cross-Platform: Works on Windows, Linux, and macOS
  • Key Algorithms: Supports ed25519 (default) and RSA 4096-bit keys
  • Config Management: Safely updates ~/.ssh/config with backups
  • Server Management: List, test, and remove server configurations
  • JSON Output: Supports machine-readable output for scripting

Installation

Install globally via npm:

npm install -g sc-ssh

Requirements

  • Node.js >= 18.0.0
  • OpenSSH client installed on your system
    • Linux: Usually pre-installed
    • macOS: Pre-installed
    • Windows: Enable OpenSSH in Settings > Apps > Optional Features, or install from Microsoft

Quick Start

  1. Install the tool
  2. Run the setup command
  3. Follow the interactive prompts
  4. Connect to your server with ssh <server-name>
sc-ssh setup

Usage

Setup SSH Access

Configure SSH access to a new server interactively:

sc-ssh setup

With options:

sc-ssh setup --algorithm rsa --port 2222

Options:

  • -a, --algorithm <type>: Key algorithm (ed25519 or rsa, default: ed25519)
  • -p, --port <number>: SSH port (default: 22)
  • -j, --json: Output in JSON format

List Configured Servers

View all configured SSH servers:

sc-ssh list

With verbose output (includes key paths):

sc-ssh list --verbose

Test Connection

Verify SSH connection to a configured server:

sc-ssh test myserver

With custom timeout:

sc-ssh test myserver --timeout 30

Remove Server

Remove a server configuration:

sc-ssh remove myserver

Force removal without confirmation:

sc-ssh remove myserver --force

Keep SSH keys while removing config:

sc-ssh remove myserver --keep-key

Manage Preferences

View current preferences:

sc-ssh config list

Get a specific preference:

sc-ssh config get default-algorithm

Set a preference:

sc-ssh config set default-algorithm rsa
sc-ssh config set default-port 2222

Available preferences:

  • default-algorithm: ed25519 or rsa
  • default-port: Port number (1-65535)
  • auto-backup: true or false
  • color-output: true or false
  • use-emoji: true or false

Examples

Complete Setup Workflow

$ sc-ssh setup
Enter server name (alias): myserver
Enter server hostname or IP address: 192.168.1.100
Enter SSH port: 22
Enter SSH username: ubuntu
Enter server password (for initial key copy): ********
Choose SSH key algorithm: ed25519 (recommended)

✓ Generating ed25519 SSH key...
✓ SSH key generated: /home/user/.ssh/id_ed25519.myserver
✓ Copying public key to server...
✓ Public key copied successfully
✓ Backing up SSH config...
✓ Backup created: /home/user/.ssh/config.backup.20251107-143022
✓ Updating SSH config...
✓ SSH config updated

✅ Setup complete! You can now connect with:
   ssh myserver

List Servers

$ sc-ssh list
Configured SSH Servers:

┌────────────┬──────────────────┬──────┬──────────┬────────────┐
│ Server     │ Hostname         │ Port │ User     │ Algorithm  │
├────────────┼──────────────────┼──────┼──────────┼────────────┤
│ myserver   │ 192.168.1.100    │ 22   │ ubuntu   │ ed25519    │
│ production │ prod.example.com │ 2222 │ deploy   │ rsa        │
└────────────┴──────────────────┴──────┴──────────┴────────────┘

Total: 2 servers

Test Connection

$ sc-ssh test myserver
Testing connection to 'myserver'...

✓ Connection successful!
  Host: 192.168.1.100:22
  User: ubuntu
  Response time: 342ms

Library Usage

sc-ssh can also be used as a library in your Node.js projects:

const { setupSSH } = require('sc-ssh');

await setupSSH({
  serverName: 'myserver',
  hostname: '192.168.1.100',
  port: 22,
  username: 'ubuntu',
  password: 'secret',
  algorithm: 'ed25519',
});

Development

Clone the repository and install dependencies:

git clone https://github.com/saulotarsobc/sc-ssh.git
cd sc-ssh
npm install

Build the project:

npm run build

Run tests:

npm test

License

ISC

Contributing

Contributions are welcome! Please see the issues page for feature requests and bug reports.

Support

For support, please open an issue on GitHub.