Skip to content

Instantly share code, notes, and snippets.

@Lordshell
Created February 17, 2018 21:17
Show Gist options
  • Save Lordshell/cf8b63b593df038d3389ade416ec54ee to your computer and use it in GitHub Desktop.
Save Lordshell/cf8b63b593df038d3389ade416ec54ee to your computer and use it in GitHub Desktop.
how to use ssh to run shell script on a remote machine
ssh root@10.10.20.141 'bash -s' < /data/git/blf-export/server_101020141_check.sh
# Schlüssel generieren
ssh-keygen -b 4096
# Key übermitteln
ssh-copy-id -i .ssh/key_rsa.pub root@server
# Testen der Key-Authentifizierung
ssh -i .ssh/key_rsa root@server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment