Digital Marketing

Run multiple command on a remote host over SSH

$ ssh USER@HOST 'COMMAND1; COMMAND2; COMMAND3'
– or –

$ ssh USER@HOST 'COMMAND1 | COMMAND2 | COMMAND3'
– or –

$ ssh USER@HOST << EOF
COMMAND1
COMMAND2
COMMAND3
EOF

Comments

Popular posts from this blog

Fixed WSL sshd: no hostkeys available -- exiting

PowerMTA pmta command

How to fix: mv: failed to preserve ownership