/srv/irclogs.ubuntu.com/2023/10/28/#ubuntu-server.txt

JanChm, seems both work indeed, even if the manpage indicates otherwise...00:03
patdk-lapit's how I have been doing it for years00:04
patdk-lapmore specifically, ssh <host> 'command; command2; command3; command4'00:04
JanCI wonder if this can be abused...00:05
JanCbecause it doesn't do what the manual says...00:06
patdk-lapwell, it says command arguments ...00:06
patdk-lapI never had that work for me atleast, and have always used '' around it instead00:07
patdk-lapwell, the most blatant abuse like all things, is someone passing things to ssh command like00:08
JanCoh, 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-lapinstead of sql injection, ssh shell injection00:08
JanCit's ambiguous at best, because it assumes command names can't have spaces in them  :)00:09
JanCfrom 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-lapthe manpage says it appends arguments with spaces to command and sends it all as a single string00:14
patdk-lapso 'ls -l -a'00:14
JanCbut all three supposedly do the same00:15
patdk-lapyes, my issue mostly was the ;00:15
JanCI would use sh -c or something like that if I wanted to run multiple commands (or a shell script, of course)00:16
patdk-lapya, the point normally of this is I dont want to remotely load a shell script00:27
patdk-lapnormally it is to login, update docker containers, to update a package/file, restart the service00:28
JanCFWIW, you can also do: ssh <host> command ';' command2 ';' command3 ';' command401:40
JanCand other weirdness01:40
JanClike: ssh <host> command ';' command2 '; command3 ;' command401:45
=== chris14_ is now known as chris14
pmatulisdoes anyone know the answer or did i miss it?04:09
pmatulisi don't get an error but when i check the history, it has not been cleared04:10
JanCdid you try to do the same in an interactive session?05:06
JanCmight be useful to look at the 'histappend' shell option also, or check what $HISTFILE gives05:09
znfmonthly reminder that THERE USED TO BE NOTHING WRONG WITH THE DEBIAN-INSTALLER 19:27
znfhttps://i.imgur.com/SvqMfSb.png19:27
znfpiece of trash subiquity 19:27
=== synapt is now known as nate
mybalzitchthou shalt not DHCP22:43
oerheksindeed, no duso while drunk22:44
oerheks*hips*22:44
oerhekssudo22:44
oerheksznf, selected wrong network adapter as base22:45
znfoerheks, uhm? no, it selected the proper one, considering I'm PXE-ing22:45

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!