Hacker News new | ask | show | jobs
by cyholic 4776 days ago
more easy to write bash aliases like alias ssh-web="ssh username@host" and you take bash completion support
2 comments

There is bash completion for ssh.

Its included as part of the bash-completion package on most distributions of linux.

Its got extremely good completion support for hostnames

It has the added advantage of also auto-completing for scp.

SCP autocomplete is very useful indeed. Especially when using ControlMaster, then autocomplete is almost instantly.
you can override some of the ssh options if you use it with sshconfig.

example ssh config: Host vps hostname 1.1.1.1 port 22 identityfile /home/emre/.ssh/vps.pub

If you want to override stuff, just do it like ssh vps -p 99.

And there is bash completion support with ssh, too. try it.

ssh <TAB>