From 670e41f7269b26c57f28a6ff9122d14bd8c2f321 Mon Sep 17 00:00:00 2001 From: Guillaume Archambault Date: Fri, 9 Aug 2024 12:36:40 +0200 Subject: [PATCH] modified: README.md --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6330e95..19a627d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@ -Voici le contenu complet du fichier `README.md` sous format code : - -```markdown # SSH Manager (sshm) -SSH Manager (sshm) is a bash script that simplifies and automates the management of SSH hosts through the SSH configuration file (`~/.ssh/config`). It provides functionalities to list, connect, view, add, edit, and delete SSH host configurations, as well as to check the availability of hosts using pings. +SSH Manager (sshm) is a bash script that simplifies and automates the management of SSH hosts through the SSH configuration file (`~/.ssh/config`). It provides functionalities to list, connect, view, add, edit, and delete SSH host configurations, check the availability of hosts using pings, and manage different SSH configuration contexts. ## Features @@ -14,6 +11,7 @@ SSH Manager (sshm) is a bash script that simplifies and automates the management - Edit an existing SSH host configuration. - Delete an SSH host configuration. - Check the availability of an SSH host using ping. +- Manage multiple SSH configuration contexts. ## Requirements @@ -92,6 +90,40 @@ sshm delete sshm ping ``` +### Manage SSH Contexts + +#### List Available Contexts + +```bash +sshm context list +``` + +This will list all available SSH configuration contexts and highlight the currently active one. + +#### Switch to a Different Context + +```bash +sshm context use +``` + +Switches the active SSH configuration to the specified context. + +#### Create a New Context + +```bash +sshm context create +``` + +Creates a new SSH configuration context. + +#### Delete a Context + +```bash +sshm context delete +``` + +Deletes the specified SSH configuration context. + ## Example ### Adding a New SSH Host @@ -127,6 +159,14 @@ sshm view myhost sshm ping myhost ``` +### Switching to a Different SSH Context + +```bash +sshm context use myconfig +``` + +Switches to the `myconfig` SSH configuration context. + ## License This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.