Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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"
Source by code.visualstudio.com #
 
PREVIOUS NEXT
Tagged: #Add #entry #windows #linux #host
ADD COMMENT
Topic
Name
5+3 =