Mace Mace - 10 months ago 54
Linux Question

Linux SSH with multiple commands

i want to make an ssh-connect to an remote host, there i want to run multiple commands.

ssh -l blabla ls -l

when i run this, i will get the result of
ls -l on 123.123...

Is it possible, to make sth like this:

ssh -l blabla ls -l & ifconfig

... it tried this:

ssh -l blabla ls -l; ifconfig

But there the local bash runs the second command.
I want the second command to run on the remote host.



Just put all commands inside a quotes

ssh afont@ "ls -l; ifconfig;"