Is the first "Using a Configuration File" example a bit misleading? The example is: ... Host remoteserver HostName remoteserver.thematrix.io User neo Port 2112 IdentityFile /home/test/.ssh/remoteserver.pub IdentityFile typically (always?) specifies a file with a private key, right?
SSH Examples, Tips and Tunnels
21–30 of 72 posts
Re: SSH Examples, Tips and Tunnels
#22Great article! One minor comment though, `folder` sounds so wrong in *nix world, I'd suggest you use directory instead.
Re: SSH Examples, Tips and Tunnels
#23Is there a way to combine screen/tmux with ssh ? like i always need to do some long running tasks over ssh and forget to put it in a screen session, i would like to open each ssh session in a screen session so that when i connect next i should be able to proceed from where i left
https://wiki.archlinux.org/index.php/Tmux#Start_tmux_on_ever...
https://superuser.com/questions/224631/is-it-a-good-idea-to-...
Re: SSH Examples, Tips and Tunnels
#24Is the first "Using a Configuration File" example a bit misleading? The example is: ... Host remoteserver HostName remoteserver.thematrix.io User neo Port 2112 IdentityFile /home/test/.ssh/remoteserver.pub IdentityFile typically (always?) specifies a file with a private key, right?
Re: SSH Examples, Tips and Tunnels
#25Earlier quoted context omitted.
The article does touch on that optimization: In this example the grep is being performed on the local system after the log file has been pushed across the ssh session. If the file is large it would be more efficient to run the grep on the remote side simply by enclosing the pipe and grep in the double quotes.
I see no benefit of running grep locally in any case unless maybe local grep is aliased in a complex way to colorize and decorate the outputs in some other way. Either way this is not a great example as you should just login and run it on the remote machine as running through pipe causes the connection to be established every time unless you keep a persistent connection open behind which is explained in the MultiPlex…
Re: SSH Examples, Tips and Tunnels
#26Is there a way to combine screen/tmux with ssh ? like i always need to do some long running tasks over ssh and forget to put it in a screen session, i would like to open each ssh session in a screen session so that when i connect next i should be able to proceed from where i left
You can't reattach the program, but there's other ways to auto-launch screen if you're often doing that.
Re: SSH Examples, Tips and Tunnels
#27Earlier quoted context omitted.
I see no benefit of running grep locally in any case unless maybe local grep is aliased in a complex way to colorize and decorate the outputs in some other way. Either way this is not a great example as you should just login and run it on the remote machine as running through pipe causes the connection to be established every time unless you keep a persistent connection open behind which is explained in the MultiPlex…
The obvious case would be when the remote grep doesn't exist at all, or is a cutdown non-gnu version of grep which didn't support things like extended or perl regexps
Having some undesired grep version could be one reason but not enough to justify piping everything before grep in the example.
Re: SSH Examples, Tips and Tunnels
#28Re: SSH Examples, Tips and Tunnels
#29If you liked this article, PLEASE, PLEASE just take 10 minutes to look at the manpages for ssh(1) and ssh_config(5). SSH options are nothing we need to research about, we humans made it and we wrote documentation for it. The manpages are also exhaustive, definitive, and valid for the exact version you have installed. Please, instead of making more 'how to use SSH'-articles popular, read the manpages yourself. Reading…
When learning, however, we often need goal directed material and examples. For multi-purpose tools - and most tools have more than one application, especially for higher level goals - that means there can be many different introductions for the same tool, depending on the learner's goal.
The best tools are compositional. Often it's hard to imagine all the ways a tool can be composed by looking at it in isolation. You need some examples to get the imagination working.
Re: SSH Examples, Tips and Tunnels
#30If you liked this article, PLEASE, PLEASE just take 10 minutes to look at the manpages for ssh(1) and ssh_config(5). SSH options are nothing we need to research about, we humans made it and we wrote documentation for it. The manpages are also exhaustive, definitive, and valid for the exact version you have installed. Please, instead of making more 'how to use SSH'-articles popular, read the manpages yourself. Reading…
ssh user@example.com
ssh -i ~/.ssh/id_rsa user@example.com