Skip to content

Repository files navigation

skssh — SSH Connection Manager for Emacs

Overview

skssh is an SSH connection manager for Emacs. It provides a tabulated host list where you can add, edit, delete, and connect to SSH hosts without leaving Emacs.

Connections use TRAMP under the hood, giving you full Emacs integration: shell buffers, Dired, and file editing all work over SSH out of the box.

A built-in dual-pane SFTP interface lets you transfer files between local and remote directories. Drag-and-drop and paste-path transfer are supported in terminal Emacs.

Host configuration is stored in ~/.emacs.d/skssh/hosts.el and never touches ~/.ssh/config. You can import existing hosts from ~/.ssh/config as a one-time operation.

Requires Emacs 29.1+.

Installation

MELPA (coming soon)

(use-package skssh)

Manual

Clone the repository and add to your load-path:

(add-to-list 'load-path "/path/to/skssh")
(require 'skssh)

Usage

CommandDescription
M-x sksshOpen host list
M-x skssh-add-hostAdd a new SSH host interactively
M-x skssh-import-from-ssh-configImport hosts from ~/.ssh/config
M-x skssh-sftpOpen dual-pane SFTP for a host

Host List Keys

KeyAction
RET / ?Open action menu (transient)
sConnect: Shell
dConnect: Dired
fOpen SFTP dual-pane
eEdit host
DDelete host
aAdd host
iImport from ~/.ssh/config
/Filter by label / host / group
GFilter by group (exact match)
qQuit

Shell Buffer Keys

Shell buffers opened by skssh activate skssh-shell-mode.

KeyAction
C-c C-qKill shell buffer, return to host list

Dired Buffer Keys

Dired buffers opened by skssh activate skssh-dired-mode.

KeyAction
C-c C-q / qKill dired buffer, return to host list

SFTP Dual-Pane Keys

KeyAction
CCopy marked files to opposite pane
TABSwitch pane
RETEnter directory
^Go up one directory
gRefresh both panes
HToggle links/user/group columns
hShow key reference (transient)
qQuit SFTP, return to host list

Drag-and-Drop / Paste File Transfer

In terminal Emacs, drag a file from your desktop onto the terminal — the terminal delivers it as a bracketed-paste event. You can also copy a file path and use C-y. skssh intercepts the paste and transfers the file to the opposite pane instead of trying to insert text into the read-only dired buffer.

Transfer direction is determined by which pane has focus:

  • Focus remote pane (TAB to switch) → file is uploaded local → remote
  • Focus local pane → file is downloaded remote → local

Supports Unix/macOS paths (/path/to/file, ~/file) and Windows paths (C:\file, C:/file).

Shell Configuration

By default skssh opens a login + interactive shell so that .bash_profile, .bashrc, .zprofile, and .zshrc are all sourced.

Global defaults

;; Remote shell program (default: /bin/bash)
(setq skssh-shell-file-name "/bin/zsh")

;; Arguments passed to the shell
;; -l = login shell (sources .bash_profile / .zprofile)
;; -i = interactive shell (sources .bashrc / .zshrc)
(setq skssh-shell-args '("-l" "-i"))

Per-host overrides

Set :shell and :shell-args when editing a host (e in the host list) to override the global defaults for that host only.

Password Authentication

skssh does not store passwords. When no :identity key is set, TRAMP uses auth-source to look up credentials:

  1. ~/.authinfo.gpg (recommended — GPG encrypted)
  2. ~/.authinfo (plain text)
  3. Minibuffer prompt (interactive fallback)

Configuration

Hosts are stored in ~/.emacs.d/skssh/hosts.el as a list of Emacs Lisp plists. The file is managed entirely by skssh; do not edit it by hand.

((:id "abc-123"
  :label "Production"
  :host "192.168.1.10"
  :user "deploy"
  :port 22
  :identity "~/.ssh/id_ed25519"
  :groups ("prod" "web")
  :shell nil          ; nil = use skssh-shell-file-name
  :shell-args nil     ; nil = use skssh-shell-args
  :notes ""))

Customization

VariableDefaultDescription
skssh-config-file~/.emacs.d/skssh/hosts.elPath to host storage file
skssh-shell-file-name"/bin/bash"Default remote shell program
skssh-shell-args'("-l" "-i")Default shell arguments
skssh-sftp-hide-detail-columnstHide links/user/group columns in SFTP panes

v0.2 Roadmap

  • ProxyJump (multi-hop connections)
  • SSH key management / ssh-agent status

License

MIT License

About

SSH Connection Manager for Emacs

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages