mirror of
https://github.com/anatolykopyl/sshukh.git
synced 2026-06-15 06:54:12 +00:00
Fixed behaviour when using ssh config alias
This commit is contained in:
12
README.md
12
README.md
@@ -1,4 +1,5 @@
|
||||
# sshukh zsh plugin
|
||||
|
||||
*SSH Update Known Hosts*
|
||||
|
||||
Prompts to update `known_hosts` file for you if needed.
|
||||
@@ -6,25 +7,33 @@ Prompts to update `known_hosts` file for you if needed.
|
||||
## Installation:
|
||||
|
||||
**With Oh-my-zsh:** run the following command:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/anatolykopyl/sshukh.git $HOME/.oh-my-zsh/custom/plugins/sshukh
|
||||
```
|
||||
|
||||
**With Antigen:** add the following to your `.zshrc`:
|
||||
|
||||
```
|
||||
antigen bundle anatolykopyl/sshukh
|
||||
```
|
||||
|
||||
To always use with ssh (recommended) add this alias to your `.zshrc`:
|
||||
|
||||
```
|
||||
alias ssh='sshukh'
|
||||
```
|
||||
|
||||
Zsh may tell you that the plugin is disabled until permissions are fixed. Just run the command it suggests.
|
||||
|
||||
```
|
||||
$ compaudit | xargs chmod g-w,o-w
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Let's connect to an ip that changed hosts:
|
||||
|
||||
```
|
||||
$ sshukh pi@192.168.1.54
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
@@ -45,4 +54,5 @@ Update known_hosts? [y/n] y
|
||||
/Users/akopyl/.ssh/known_hosts updated.
|
||||
Original contents retained as /Users/akopyl/.ssh/known_hosts.old
|
||||
```
|
||||
There is a prompt asking if you want to remove the conflicting host from `known_hosts` and upon answering `y` ssh reruns automatically successfully.
|
||||
|
||||
There is a prompt asking if you want to remove the conflicting host from `known_hosts` and upon answering `y` ssh reruns automatically successfully.
|
||||
Reference in New Issue
Block a user