Earlier quoted context omitted.
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
What chance is there that grep doesn't exist on a machine that has ssh and cat? Having some undesired grep version could be one reason but not enough to justify piping everything before grep in the example.
SSH Examples, Tips and Tunnels
41–50 of 72 posts
Re: SSH Examples, Tips and Tunnels
#42If 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…
My usage of manpages would increase by orders of magnitude if I knew there were examples of actual working commands in the first page. Most of the time I am not looking for an obscure parameter, but my brain just has failed to take a note of the basic syntax of the command. So why not start ssh manpage with two simple examples, how to connect to a host with username and ssh key: ssh user@example.com ssh -i ~/.ssh/id_…
Works as a reference but also for explorative learning.
Re: SSH Examples, Tips and Tunnels
#43Is 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
Also consider using ssh config to make your default command create or attach a tmux session.
Re: SSH Examples, Tips and Tunnels
#44I've been using SSH tunnels for years, this keeps me safe and sane. Also at work where my employer closed almost everything. Including well known web pages with info useful for my work...
Re: SSH Examples, Tips and Tunnels
#45Earlier quoted context omitted.
My usage of manpages would increase by orders of magnitude if I knew there were examples of actual working commands in the first page. Most of the time I am not looking for an obscure parameter, but my brain just has failed to take a note of the basic syntax of the command. So why not start ssh manpage with two simple examples, how to connect to a host with username and ssh key: ssh user@example.com ssh -i ~/.ssh/id_…
indeed. I've always thought this, would be nice to see examples that might cover my need. Then read what the switches/options do.
Re: SSH Examples, Tips and Tunnels
#46Does anyone use OSSEC on their personal workstation or personal server? I have some MacOS machines with public IP addresses with ssh access enabled, and I'm wondering if I should use something like this. Presently I have the MacOS firewall configured but that's it.
Re: SSH Examples, Tips and Tunnels
#47If 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…
My usage of manpages would increase by orders of magnitude if I knew there were examples of actual working commands in the first page. Most of the time I am not looking for an obscure parameter, but my brain just has failed to take a note of the basic syntax of the command. So why not start ssh manpage with two simple examples, how to connect to a host with username and ssh key: ssh user@example.com ssh -i ~/.ssh/id_…
https://tldr.sh/ and http://bropages.org/ spring to mind, and I know there are others that I'm not immediately remembering ATM, both of which have web interfaces or can be installed as local command-line tools.
Re: SSH Examples, Tips and Tunnels
#48Earlier quoted context omitted.
While I myself am not a purist, some people would consider this an instance of UUOC: http://porkmail.org/era/unix/award.html > localhost:~$ ssh remoteserver "grep badstuff.php /var/log/nginx/access.log"
The only reason I (and probably many other people) prefer cat | grep instead of just using grep is because it is much easier to change the search term this way. With cat, it’s only a ctrl-W away from using a different term. If I only used grep, i would have to move my cursor which can get pretty annoying with a long file path. That being said, only using grep is my preferred approach (if I don’t forget it) in script…
$ ^term1^term2^
Try it
Re: SSH Examples, Tips and Tunnels
#49Is 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
Re: SSH Examples, Tips and Tunnels
#50If 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…