How to deploy with SCP and custom port


#1

I have a similar issue, however due to the way I connect to server, I can’t figure out how to apply this solution

I connect to my server like this

ssh -p 2222 thatilike@192.185.21.105

then cd public_html

The public_htlm folder is where I want to copy file to

Let’s say I want to copy logo.png to the public folder what would be the command for that?


Deploying to generic server with SSH, et al
#2

If logo.png was in the root of your repository and you wanted to deploy the master branch:

deployment:
  production:
    branch: master
    commands:
      - scp -P 2222 ~/<MY-REPO-NAME>/logo.png thatilike@192.185.21.105:public_html/

#3