How to push files directly on the server from local using SSH key
How to clone files from GitHub and upload into your GoDaddy server using SSH key on Mac Terminal
Set up your Mac terminal with the server using an SSH key to push files on the server
Clone files from GitHub and setup SSH key on your Mac terminal to upload the files directly into your GoDaddy server
Following the step to set it up -
- Setup GoDaddy account - Log in to your GoDaddy account. Go to the navigation > My Products > Web hosting > Manage > Settings > Select the server tab > Turn on the SSH access.
2. Generate SSH key from Mac Terminal - Open your Mac terminal and create an SSH key. To create the SSH key type this code 👉🏻 ssh-keygen -t rsa 👈 and press enter, enter and enter until you create the key. When the key was created then type this code to generate the code snippet 👉🏻 ~/.ssh/id_rsa.pub 👈 press enter, and the code will be generated.
3. Import the SSH key - Go to your cPanel and choose the option SSH Access under Security Tab. Select Manage SSH Keys > Import key, from here scroll down the Paste the public key into the following text box: section and paste your SSH key code snippet, that we already created in Step 2 👆
4. Authorized the key - Go to your cPanel and choose the option SSH Access under Security Tab. Select Manage SSH keys, you’ll see your key is not authorized. Select the Manage option under the Action and press the Authorize button. Your key is now Authorized.
5. Terminal Setup - Open Mac terminal and type 👉🏻 ssh (cPanel login username )@( IP address ) You can get your cPanel username and IP address from your GoDaddy account.
6. Clone the files and deploy on the GoDaddy server - Clone the URL of your git repo and open your Mac terminal type the Step 5 code 👆 and type git clone yourRepoUrl
You’re all set with your new bang 🎉🚀
Thank you very much for your valuable time. 🙏 Hope you enjoyed reading this blog.
Find my journey on KiwisMedia — https://kiwismedia.com/@saha
My portfolio website- https://www.pixabuddy.com/
Don’t forget to follow me on social media 🌏- Instagram, Twitter, Behance, Dribbble, Pinterest