{"id":8812,"date":"2020-04-08T08:00:17","date_gmt":"2020-04-08T05:00:17","guid":{"rendered":"https:\/\/vipestudio.com\/?p=8812"},"modified":"2021-07-02T15:50:28","modified_gmt":"2021-07-02T12:50:28","slug":"how-to-use-ssh-to-connect-to-your-wordpress-server","status":"publish","type":"post","link":"https:\/\/vipestudio.com\/en\/how-to-use-ssh-to-connect-to-your-wordpress-server\/","title":{"rendered":"How to Use SSH to Connect to Your WordPress Server?"},"content":{"rendered":"<p style=\"text-align: left;\">As a developer, you\u2019ll find that SSH is an essential part of your toolbox. You can use it to lay down state-of-the-art environments, tweak websites, automate run-of-the-mill tasks on WordPress, or as a failsafe to access your site. Let me walk you through what is meant by SSH and how you can use it to connect to your WordPress server.<\/p>\n<h2 style=\"text-align: left;\">A Beginner\u2019s Guide to SSH<\/h2>\n<p style=\"text-align: left;\">SSH or \u201cSecure Shell\u201d, according to ssh.com, \u201cis a method for secure remote login from one computer to another\u201d. Or to put it simply, it lets you log in to a server and avail of its services.<br \/>\nYou\u2019ll need an SSH client and credentials to login via SSH.<\/p>\n<h2 style=\"text-align: left;\">SSH Clients<\/h2>\n<p style=\"text-align: left;\">If you have a Mac or a Linux box, you\u2019re set to get started with SSH from the terminal itself. For the folks with a regular old Windows machine, the SSH client comes into play \u2013 the popular choice being Putty. Read on to find a simple Putty tutorial so you can hit the ground running.<\/p>\n<h2 style=\"text-align: left;\">Login Credentials<\/h2>\n<p style=\"text-align: left;\">Your credentials for an SSH login are comprised of at least the server details, your username, your password, and the port for login. The server address can be either your domain name or IP address, and the port only needs to be specified if you\u2019re not using the default port. Here are examples of terminal commands for SSH login:<\/p>\n<p style=\"text-align: left;\"><code>ssh adminguy@yourdomain.com -p 22<\/code><\/p>\n<h2 style=\"text-align: left;\">Putty Setup &#8211;\u00a0 for Windows users<\/h2>\n<p style=\"text-align: left;\">As mentioned above, this is for Windows machines, so the Mac and Linux people can skip right over this Putty tutorial.<\/p>\n<p style=\"text-align: left;\">Download Putty, run the program. Once the application screen has loaded up, paste your server address into the field named \u2018hostname\u2019. If you have a port number, enter it in the field next to the hostname, set the protocol to SSH, and click on \u2018Open\u2019 at the bottom right.<\/p>\n<p style=\"text-align: left;\">There should now be a new window that resembles a Linux terminal or a command prompt. When prompted, enter your username, and then your password. In just a bit, you will be logged in to the server. You might get notifications about such things as RSA fingerprints; click OK and proceed.<\/p>\n<h2 style=\"text-align: left;\">Using the Terminal to Connect through SSH \u2013 Mac and Linux users<\/h2>\n<p style=\"text-align: left;\">Needless to say, Windows users don\u2019t need to read this once Putty is setup, so skip on over.<\/p>\n<p style=\"text-align: left;\">This is a simple process: open terminal, enter the command. The command itself, as we\u2019ve seen before, is in the form:<\/p>\n<p style=\"text-align: left;\"><code>ssh username@servername &lt;-p port number&gt;<\/code><\/p>\n<p style=\"text-align: left;\">As seen before, the port part of the command is optional. Enter your actual credentials above, press Enter, enter the password when prompted for it, and log in. Any notifications you receive about RSA fingerprints or other such things can be agreed to by pressing Enter or entering \u201cy\u201d (for yes) to proceed.<\/p>\n<p style=\"text-align: left;\">Those of you who did not heed our suggestion to skip one of the sections will now be enlightened with the knowledge that both processes are essentially similar. From here on, it will be identical.<\/p>\n<h2 style=\"text-align: left;\">SSH Commands<\/h2>\n<p style=\"text-align: left;\">You can now enter a whole bunch of SSH commands, just like on the regular terminal or command prompt. The thing to remember is that with great freedom comes great opportunities \u2013 including the possibility of screwing up something irreversibly.<\/p>\n<p style=\"text-align: left;\">You may end up deleting or stopping something essential or important. So make like Peter Parker, use SSH responsibly, and you should be fine. Congratulations, you are now an SSH WordPress ninja.<\/p>\n<p style=\"text-align: left;\"><em><strong>In Part 2: WP-CLI and what it can do for you<\/strong><\/em><\/p>\n<p style=\"text-align: left;\">WP-CLI is a CLI (Command Line Interface) for WordPress and there are all sorts of cool tricks up its sleeve. In the next part, we\u2019ll see how you can install it, and use it to connect to your server with SSH.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a developer, you\u2019ll find that SSH is an essential [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":13983,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[116],"tags":[189,185,188,184,187,186],"class_list":["post-8812","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-freestyle","tag-bash","tag-linux","tag-putty","tag-ssh","tag-terminal","tag-wp-cli"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts\/8812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/comments?post=8812"}],"version-history":[{"count":0,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts\/8812\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/media\/13983"}],"wp:attachment":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/media?parent=8812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/categories?post=8812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/tags?post=8812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}