maximbaz/dotfiles

z4h ssh exception

n1ete opened this issue · 1 comments

n1ete commented

thanks to you i switched to z4h, but i couldnt figured out how to connect via ssh without the z4h extensions.....for instance to connect to an router or other more restricted system....can you point me again in the right direction?

thanks again and be well

Hi @n1ete ,

You need to use zstyle to setup the exclusion:

In your ~/.zshrc add this:

zstyle ':z4h:ssh:yourrouter' passthrough yes
zstyle ':z4h:ssh:yourrouter' ssh-command command ssh

where yourrouter is the shortname you use to access to your router. You can setup this in ~/.ssh/config, for eg:

...
Host yourrouter
    Hostname 192.168.42.254
    User root
    Port 22
...

You can got all details updated in the top of this file https://github.com/romkatv/zsh4humans/blob/v3/fn/-z4h-ssh
Hope this help, regards