Answers for "Add entry in authorized_keys from windows to linux host"

0

Add entry in authorized_keys from windows to linux host

$USER_AT_HOST="your-user-name-on-host@hostname"
$PUBKEYPATH="$HOME.sshid_rsa.pub"

$pubKey=(Get-Content "$PUBKEYPATH" | Out-String); ssh "$USER_AT_HOST" "mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo '${pubKey}' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
Posted by: Guest on January-17-2022

Code answers related to "Add entry in authorized_keys from windows to linux host"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language