Skip to main content

Posts

Showing posts with the label how-to

How to set up SSH keys to access remote servers

In an earlier post , I mentioned how to switch your GitHub remote URL from HTTPS to SSH, which can improve productivity. Now before you can push and pull your repositories automatically, you'll also need to set up your SSH key. Setting SSH keys is extremely useful and can be applied to other uses outside GitHub; essentially whenever you need access to a remote server you will be required to provide a username and password, and setting an SSH key allows secure access to the desired server without having the user to provide that information every single time. SSH stands for secure shell or secure socket shell, and is used for secure access to a remote server. When you use SSH to connect to a remote server (i.e., another Linux computer), you create a shell session on that server through the terminal on your system. This text-based interface allows you to send any command remotely from your system to that server....

How to switch a remote repo URL from HTTPS to SSH (and vice versa)

For my first post, I figured I could start with something really simple. I encountered this at work some time ago, but I forgot how to solve it after encountering it once again recently. Basically, I realized that (after not updating my website for awhile) I git cloned my repository using HTTPS instead of SSH onto my laptop. For the sake of convenience, I wanted to be able to do git pull, push and so on without having to validate my identification every time. This is awfully simple, but I figured I might as well document this in case I forget it in the future, and hopefully this helps someone in need too. I referred to the GitHub documentation for the following tutorial. When cloning repositories, you can choose whether to do it via HTTPS or SSH. A HTTPS type clone is creating a copy of a remote repo which you do not have automatic write access to , while an SSH type clone gives you the access to push your changes (as long as you have an SSH key set up) automatically . Hence,...