Created
February 17, 2018 21:17
-
-
Save Lordshell/cf8b63b593df038d3389ade416ec54ee to your computer and use it in GitHub Desktop.
how to use ssh to run shell script on a remote machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh root@10.10.20.141 'bash -s' < /data/git/blf-export/server_101020141_check.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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