Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SSH into server and run commands - DEPLOYMENT on Linux server from Windows Server #deployment
C:\path\to\putty\PLINK.EXE 167.XXX.XXX.XXX -l root -i C:\path\to\private\key\private.ppk (cd /commands\to\run\separated\by\semicolon;git pull)
@technoknol
Copy link
Author

technoknol commented Oct 18, 2019

Explanation

C:\path\to\putty\PLINK.EXE

path to PLINK.exe from putty folder.

167.XXX.XXX.XXX

server's IP in which you want to SSH

root

user name

C:\path\to\private\key\private.ppk

Path to private key generated via PuttyGen.exe, If not generated yet generate it.

(cd /commands\to\run\separated\by\semicolon;git pull)

Format is (command1;command2)
e.g. (cd /var/www/html/project1;git pull;php artisan migrate)
all the commands that you want to run on server, all commands should be separated by ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment