Network and SSH utility functions for fish shell. Most have been ported from my zsh dotfiles or from other dotfiles found over the years.
Install with [Fisher][] (recommended):
fisher add halostatue/fish-utils-net # fisher 3.x
fisher install halostatue/fish-utils-net # fisher 4.0+
Not using a package manager?
Copy functions/*.fish
to your fish configuration directory preserving the
directory structure.
- [fish][] 3.0+
Shows IPv4 addresses for the given interface or all interfaces.
addr
Prints the TLS certificate for the domain provided using OpenSSL.
Retreives the definition for a word from dict.org
.
def dictionary
Shorthand responses from dig.
dig1 google.com
diga google.com
Digs my public IP address.
digip
Open one or more manpages at man.cx
.
man.cx sshd_config
man.cx 5 ssh_config
Shows processes listening on ports. Options are passed to lsof
.
ports
Returns true if the current shell was run from SSH.
Copies one or more SSH public key file identities to the
~/.ssh/authorized_keys
file of a remote server. This is a fish shell
translation of the same script available for bash or zsh.
Create the text required for SSHFP DNS records (SSH fingerprint) for a host.
Connect to an SSH server as a new connection (StrictHostKeyChecking
is
off). This should only be used on trusted servers as it skips host key
checking. All parameters are passed to ssh
.
Connect to an SSH server as a temporary connection (StrictHostKeyChecking
is off and the host is not written to the SSH hosts file). This should only
be used on trusted transient servers (such as CI debug servers) as it skips
host key checking. All parameters are passed to ssh
, sftp
, or scp
as
appropriate.
[]: https://github.com/halostatue/fish-utils-net/releases [Fisher]: https://github.com/jorgebucaran/fisher [fish]: https://github.com/fish-shell/fish-shell