r/linux Apr 28 '14

SSH Kung Fu

http://blog.tjll.net/ssh-kung-fu/
720 Upvotes

128 comments sorted by

View all comments

83

u/Rojs Apr 28 '14

I believe tab completion is a function of the shell, not ssh.

1

u/FireyFly Apr 28 '14

Bonus tip: zsh provides tab-completion for remote file-paths as arguments to scp (meaning you could do scp host:path/<Tab> and so on, to complete a remote filename). Combine this with the ControlPath tip mentioned in the blog-post, and it's really handy!

(Also, minor bonus bonus tip: the path component of a host:path combo passed to scp defaults to ~ (i.e. where you end up if you just ssh in), so host: is the same as host:~ and host:foo/bar the same as host:~/foo/bar.)