Files
sshs/README.md
Patrick Niebeling 4af69e3b37 Update README.md
2025-07-18 09:32:23 +02:00

94 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🔐 sshs Interaktiver SSH-Verbindungshelfer mit `fzf`
`sshs` ist ein kompaktes Bash-Skript für den schnellen und bequemen Aufbau von SSH-Verbindungen.
Es bietet eine durchsuchbare Liste bekannter Hosts aus `~/.ssh/known_hosts` via `fzf`,
unterstützt aber auch den direkten Aufruf mit Parametern wie `host:port` oder `user@host`.
---
## 📦 Features
- Interaktive Auswahl bekannter Hosts über [`fzf`](https://github.com/junegunn/fzf)
- Hostliste im Format `host:port` vollständig durchsuchbar
- Unterstützung für manuelle Eingabe neuer Hosts (inkl. Port)
- Direkte Verbindung über Parameter möglich:
- `sshs host`
- `sshs host:port`
- `sshs user@host`
- `sshs user@host:port`
- Automatische Erkennung von Host, Port und optional Benutzer
- Standard-Port 22 wird automatisch verwendet, wenn keiner angegeben ist
- Kein lästiges Port-Abfragen schnell & effizient
---
## 🧪 Anwendungsbeispiele
### 🔍 Interaktiv starten
```bash
sshs
```
Es öffnet sich `fzf` mit einer Liste wie:
```
server01.local:22
server02.domain.de:2222
server03.gnilebein.de:10000
```
Suche, wähle oder gib einfach manuell einen Host ein (z.B. `meinhost.de:2200`).
### 🚀 Direktverbindung per Parameter
```bash
sshs server01.local
sshs server02.domain.de:2222
sshs root@server.gnilebein.de:10000
```
---
## 📋 Voraussetzungen
- **Bash** (getestet mit Version 4+)
- **fzf** (muss installiert und im `$PATH` verfügbar sein)
- Eine vorhandene Datei `~/.ssh/known_hosts` (ohne gehashte Einträge)
---
## 🔧 Installation
```bash
cd /usr/local/src
git clone https://gitea.gnilebein.de/gnilebein/sshs.git
ln -sf /usr/local/src/sshs/sshs.bash /usr/local/bin/sshs
chmod +x /usr/local/src/sshs/sshs.bash
```
Optional: Füge einen Alias in deine Shell-Konfiguration ein (`.bashrc`, `.zshrc` o. ä.):
```bash
alias sshs='/usr/local/bin/sshs'
```
Dann einmal neu laden:
```bash
source ~/.bashrc # oder: source ~/.zshrc
```
---
## 🧑‍💻 Autor
Erstellt für den täglichen SSH-Alltag robust, schnell und angenehm zu bedienen.
Herausgeber: [gnilebein.de](https://gnilebein.de)
---
## 📝 Lizenz
MIT License frei nutzbar, Änderungen erlaubt, Nutzung auf eigene Verantwortung.