JanC | hm, seems both work indeed, even if the manpage indicates otherwise... | 00:03 |
---|---|---|
patdk-lap | it's how I have been doing it for years | 00:04 |
patdk-lap | more specifically, ssh <host> 'command; command2; command3; command4' | 00:04 |
JanC | I wonder if this can be abused... | 00:05 |
JanC | because it doesn't do what the manual says... | 00:06 |
patdk-lap | well, it says command arguments ... | 00:06 |
patdk-lap | I never had that work for me atleast, and have always used '' around it instead | 00:07 |
patdk-lap | well, the most blatant abuse like all things, is someone passing things to ssh command like | 00:08 |
JanC | oh, wait, the manpage does say it can work like that: """A complete command line may be specified as command, or it may have additional arguments.""" | 00:08 |
patdk-lap | instead of sql injection, ssh shell injection | 00:08 |
JanC | it's ambiguous at best, because it assumes command names can't have spaces in them :) | 00:09 |
JanC | from what I understand it would execute «ssh <host> 'ls -l' -a» as if you would use «ssh <host> 'ls -l -a'» or «ssh <host> ls -l -a» | 00:13 |
patdk-lap | the manpage says it appends arguments with spaces to command and sends it all as a single string | 00:14 |
patdk-lap | so 'ls -l -a' | 00:14 |
JanC | but all three supposedly do the same | 00:15 |
patdk-lap | yes, my issue mostly was the ; | 00:15 |
JanC | I would use sh -c or something like that if I wanted to run multiple commands (or a shell script, of course) | 00:16 |
patdk-lap | ya, the point normally of this is I dont want to remotely load a shell script | 00:27 |
patdk-lap | normally it is to login, update docker containers, to update a package/file, restart the service | 00:28 |
JanC | FWIW, you can also do: ssh <host> command ';' command2 ';' command3 ';' command4 | 01:40 |
JanC | and other weirdness | 01:40 |
JanC | like: ssh <host> command ';' command2 '; command3 ;' command4 | 01:45 |
=== chris14_ is now known as chris14 | ||
pmatulis | does anyone know the answer or did i miss it? | 04:09 |
pmatulis | i don't get an error but when i check the history, it has not been cleared | 04:10 |
JanC | did you try to do the same in an interactive session? | 05:06 |
JanC | might be useful to look at the 'histappend' shell option also, or check what $HISTFILE gives | 05:09 |
znf | monthly reminder that THERE USED TO BE NOTHING WRONG WITH THE DEBIAN-INSTALLER | 19:27 |
znf | https://i.imgur.com/SvqMfSb.png | 19:27 |
znf | piece of trash subiquity | 19:27 |
=== synapt is now known as nate | ||
mybalzitch | thou shalt not DHCP | 22:43 |
oerheks | indeed, no duso while drunk | 22:44 |
oerheks | *hips* | 22:44 |
oerheks | sudo | 22:44 |
oerheks | znf, selected wrong network adapter as base | 22:45 |
znf | oerheks, uhm? no, it selected the proper one, considering I'm PXE-ing | 22:45 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!