Skip to content

Instantly share code, notes, and snippets.

@jezman
Created June 1, 2017 14:09
Show Gist options
  • Save jezman/bd3d6d2ee86d71587bee685d071fa0f7 to your computer and use it in GitHub Desktop.
Save jezman/bd3d6d2ee86d71587bee685d071fa0f7 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Generate ssh key and deploy to server
# keyName=$1
# server=$2
# Example: ./gendep.sh rsaNode01 '[email protected] -p2222'
ssh-keygen -t rsa -q -N '' -C $1 -f ~/.ssh/$1
ssh-copy-id -i ~/.ssh/$1 $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment