Skip to content

Instantly share code, notes, and snippets.

@technoknol
Created October 18, 2019 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save technoknol/2d2438f778382aabb2745c89da2b3089 to your computer and use it in GitHub Desktop.
Save technoknol/2d2438f778382aabb2745c89da2b3089 to your computer and use it in GitHub Desktop.
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

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