{"id":14678,"date":"2024-02-03T19:04:45","date_gmt":"2024-02-03T15:34:45","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=14678"},"modified":"2024-02-04T09:36:25","modified_gmt":"2024-02-04T06:06:25","slug":"how-to-use-ssh-to-connect-to-a-remote-server","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/","title":{"rendered":"How to use SSH to connect to a remote server"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">Introduction<\/h2>\n<p>One of the essential tools to master as a system administrator is SSH. SSH or Secure Shell is a protocol used to securely log in to remote systems. It is the most common way to access Linux servers remotely. In this guide, we will discuss how to use SSH to connect to a remote system.<\/p>\n<h2 id=\"%d9%86%d8%ad%d9%88-%d9%87%d8%b3%d8%aa%d9%87\">Core syntax<\/h2>\n<p>To connect to a remote system using SSH, we use the ssh command. If you are using Windows, you will need to install a version of OpenSSH so that you can ssh from the terminal. If you prefer to work in PowerShell, you can follow Microsoft&#039;s documentation for adding OpenSSH to PowerShell. If you prefer to have a full Linux environment available, you can set up WSL, the Windows Subsystem for Linux, which includes ssh by default. Finally, as a third lightweight option, you can install Git for Windows, which provides a Windows bash terminal environment that includes the ssh command. Each of these is well supported, and which one you decide to use depends on your preference. If you are using Mac or Linux, you will already have the ssh command in your terminal.<\/p>\n<p>The simplest form of the command is:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ssh remote_host<\/code><\/pre>\n<\/div>\n<p>remote_host in this example is the IP address or domain name you want to connect to. This command assumes that your username on the remote system is the same as your username on your local system.<\/p>\n<p>If your username is different on the remote system, you can specify it using this syntax:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ssh remote_username@remote_host<\/code><\/pre>\n<\/div>\n<p>After connecting to the server, you may be asked to verify your identity by providing a password. We&#039;ll look at how to generate keys to use instead of passwords later.<\/p>\n<p>To exit ssh and return to your local shell, type:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>exit<\/code><\/pre>\n<\/div>\n<h2 id=\"ssh-%da%86%da%af%d9%88%d9%86%d9%87-%da%a9%d8%a7%d8%b1-%d9%85%db%8c-%da%a9%d9%86%d8%af%d8%9f\">How does SSH work?<\/h2>\n<p>SSH works by connecting a client program to an ssh server called sshd. In the previous section, ssh was the client program. The ssh server was already running on the remote_host that we specified. In almost all Linux environments, the sshd server should start automatically. If it is not running for some reason, you may need to temporarily access your server through a web-based console or local serial console. The process required to start the ssh server depends on the Linux distribution you are using.<\/p>\n<p>On Ubuntu, you can start the ssh server by typing:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo systemctl start ssh<\/code><\/pre>\n<\/div>\n<p>This should start the sshd server and then you can log in remotely.<\/p>\n<h2 id=\"%d9%86%d8%ad%d9%88%d9%87-%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c-ssh\">How to configure SSH<\/h2>\n<p>When you change the SSH configuration, you change the settings of the sshd server. On Ubuntu, the main sshd configuration file is located at \/etc\/ssh\/sshd_config. Before editing, make a backup copy of the current version of this file:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo cp \/etc\/ssh\/sshd_config{,.bak}<\/code><\/pre>\n<\/div>\n<p>Open it using nano or your favorite text editor:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo nano \/etc\/ssh\/sshd_config<\/code><\/pre>\n<\/div>\n<p>You&#039;ll want to leave most of the options in this file as is, but there are a few you might want to take a look at:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>Port 22<\/code><\/pre>\n<\/div>\n<p>The port declaration specifies which port the sshd server listens on for connections. By default, this is 22. You should probably leave this setting alone unless you have specific reasons to do so. If you change your port, we&#039;ll show you how to connect to the new port below.<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>HostKey \/etc\/ssh\/ssh_host_rsa_key\r\nHostKey \/etc\/ssh\/ssh_host_dsa_key\r\nHostKey \/etc\/ssh\/ssh_host_ecdsa_key<\/code><\/pre>\n<\/div>\n<p>Host key declarations specify where to look for global host keys. We will discuss what a host key is later.<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>SyslogFacility AUTH\r\nLogLevel INFO<\/code><\/pre>\n<\/div>\n<p>These two items indicate the level of logging that should occur.<\/p>\n<p>If you&#039;re having problems with SSH, increasing the logging rate may be a good way to discover the problem.<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>LoginGraceTime 120\r\nPermitRootLogin yes\r\nStrictModes yes<\/code><\/pre>\n<\/div>\n<p>These parameters specify some login information.<\/p>\n<p>LoginGraceTime specifies how many seconds to keep the connection open without a successful login. It may be a good idea to set this time to just a little longer than the time it takes for a normal login. PermitRootLogin selects whether the root user is allowed to log in. In most cases, this should be changed to no when you have created a user account that has elevated privileges (via su or sudo) and can log in via ssh to minimize the risk of root access to your server. .strictModes is a security guard that refuses to allow login attempts if the authentication files are publicly readable. This prevents login attempts when the configuration files are not secure.<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>X11Forwarding yes\r\nX11DisplayOffset 10<\/code><\/pre>\n<\/div>\n<p>These parameters configure a feature called X11 Forwarding. This allows you to view a remote system&#039;s graphical user interface (GUI) on the local system. This option must be enabled on the server and given when connecting with the -X option with an SSH client. After making your changes, save and close the file. If you are using nano, press Ctrl+X, then press Y and then Enter when prompted. If you changed any settings in \/etc\/ssh\/sshd_config, make sure you reload your sshd server to apply your changes:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo systemctl reload ssh<\/code><\/pre>\n<\/div>\n<p>You should test your changes thoroughly to make sure they work as you expect. It may be a good idea to have several terminal sessions open while you make changes. This will allow you to revert the configuration if necessary without locking yourself out.<\/p>\n<h2 id=\"%d9%86%d8%ad%d9%88%d9%87-%d9%88%d8%b1%d9%88%d8%af-%d8%a8%d9%87-ssh-%d8%a8%d8%a7-%da%a9%d9%84%db%8c%d8%af%d9%87%d8%a7\">How to log in to SSH with keys<\/h2>\n<p>Although remote login using passwords is useful, setting up key-based authentication is faster and more secure.<\/p>\n<h5 id=\"%d8%a7%d8%ad%d8%b1%d8%a7%d8%b2-%d9%87%d9%88%db%8c%d8%aa-%d9%85%d8%a8%d8%aa%d9%86%db%8c-%d8%a8%d8%b1-%da%a9%d9%84%db%8c%d8%af-%da%86%da%af%d9%88%d9%86%d9%87-%da%a9%d8%a7%d8%b1-%d9%85%db%8c-%da%a9%d9%86\">How does key-based authentication work?<\/h5>\n<p>Key-based authentication works by creating a pair of keys: a private key and a public key. The private key resides on the client machine and is kept secure and secret. The public key can be given to anyone or placed on any server you want to access. When you try to connect using a key pair, the server uses the public key to create a message for the client computer that can only be read by the private key. The client computer then sends the appropriate response to the server, and the server knows that the client is legitimate. This process is done automatically after you configure your keys.<\/p>\n<h5 id=\"%d9%86%d8%ad%d9%88%d9%87-%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%da%a9%d9%84%db%8c%d8%af%d9%87%d8%a7%db%8c-ssh\">How to create SSH keys<\/h5>\n<p>SSH keys must be created on the computer you want to log in from. This is usually your local machine.<\/p>\n<p>Enter the following at the command line:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ssh-keygen -t rsa<\/code><\/pre>\n<\/div>\n<p>You may be asked to set a password for the key files themselves, but this is a fairly uncommon practice and you should press enter through the commands to accept the defaults. Your keys will be created in ~\/.ssh\/id_rsa.pub and ~\/.ssh\/id_rsa.<\/p>\n<p>Change to the .ssh directory by typing the following code:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cd ~\/.ssh<\/code><\/pre>\n<\/div>\n<p>Look at the file permissions:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ls -l<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>Output\r\n-rw-r--r-- 1 demo demo 807 Sep 9 22:15 authorized_keys\r\n-rw------- 1 demo demo 1679 Sep 9 23:13 id_rsa\r\n-rw-r--r-- 1 demo demo 396 Sep 9 23:13 id_rsa.pub<\/code><\/pre>\n<\/div>\n<p>As you can see, the id_rsa file is readable and writable only by the owner. This helps keep it secret.<\/p>\n<p>However, the id_rsa.pub file can be shared and has the appropriate permissions for this activity.<\/p>\n<h5 id=\"%d9%86%d8%ad%d9%88%d9%87-%d8%a7%d9%86%d8%aa%d9%82%d8%a7%d9%84-%da%a9%d9%84%db%8c%d8%af-%d8%b9%d9%85%d9%88%d9%85%db%8c-%d8%a8%d9%87-%d8%b3%d8%b1%d9%88%d8%b1\">How to transfer the public key to the server<\/h5>\n<p>If you currently have password-based access to a server, you can copy your public key to it by issuing this command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ssh-copy-id remote_host<\/code><\/pre>\n<\/div>\n<p>This will initiate an SSH session. After you enter your password, it will copy your public key to the server&#039;s authorized keys file, allowing you to log in without a password the next time.<\/p>\n<h2 id=\"%da%af%d8%b2%db%8c%d9%86%d9%87-%d9%87%d8%a7%db%8c-%d8%b3%d9%85%d8%aa-%da%a9%d9%84%d8%a7%db%8c%d9%86%d8%aa\">Client-side options<\/h2>\n<p>There are a number of optional commands you can provide when connecting via SSH. Some of these may be required to match the settings in the remote host&#039;s sshd configuration.<\/p>\n<p>For example, if you changed the port number in your sshd configuration, you need to match that port on the client side by typing:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ssh -p port_number remote_host<\/code><\/pre>\n<\/div>\n<p>If you want to run just one command on a remote system, you can specify it after the host like so:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ssh remote_host command_to_run<\/code><\/pre>\n<\/div>\n<p>You connect to the remote device, authenticate, and the command is executed.<\/p>\n<p>As we said before, if X11 Forwarding is enabled on both computers, you can access that functionality by typing the following:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ssh -X remote_host<\/code><\/pre>\n<\/div>\n<p>Provided you have the right tools on your computer, the GUI programs you use on the remote system will now open their own window on your local system.<\/p>\n<h2 id=\"%d8%ba%db%8c%d8%b1%d9%81%d8%b9%d8%a7%d9%84-%da%a9%d8%b1%d8%af%d9%86-%d8%a7%d8%ad%d8%b1%d8%a7%d8%b2-%d9%87%d9%88%db%8c%d8%aa-%d8%b1%d9%85%d8%b2-%d8%b9%d8%a8%d9%88%d8%b1\">Disable password authentication<\/h2>\n<p>If you have created SSH keys, you can increase the security of your server by disabling password-only authentication. Other than the console, the only way to log into your server is through the private key, which is paired with the public key you installed on the server.<\/p>\n<p>As root or a user with sudo privileges, open the sshd configuration file:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo nano \/etc\/ssh\/sshd_config<\/code><\/pre>\n<\/div>\n<p>Find the line that reads password authentication and delete it by removing the leading #. You can then change its value to no:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>PasswordAuthentication no<\/code><\/pre>\n<\/div>\n<p>Two other settings that don&#039;t need to be changed (assuming you haven&#039;t already modified this file) are PubkeyAuthentication and ChallengeResponseAuthentication. They are set by default and should read as follows:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>PubkeyAuthentication yes\r\nChallengeResponseAuthentication no<\/code><\/pre>\n<\/div>\n<p>After making changes, save and close the file.<\/p>\n<p>You can now reload the SSH daemon:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo systemctl reload ssh<\/code><\/pre>\n<\/div>\n<p>Password authentication should now be disabled and your server should only be accessible via SSH key authentication.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">Result<\/h2>\n<p>Learning how to use SSH will be very useful for any of your future cloud computing endeavors. As you use the different options, you will discover more advanced functions that can make your life easier. SSH has remained popular because it is secure, lightweight, and useful in a variety of situations.<\/p>","protected":false},"excerpt":{"rendered":"Introduction One of the essential tools to master as a system administrator is SSH. SSH or Secure Shell\u2026","protected":false},"author":1,"featured_media":14680,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_focuskeywords":"","_yoast_wpseo_primary_category":"193","footnotes":""},"categories":[193,204],"tags":[393,226],"class_list":{"0":"post-14678","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-servers","9":"tag-ssh","10":"tag-226"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631 - \u0628\u0644\u0627\u06af ITPiran<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631 - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 \u06cc\u06a9\u06cc \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0636\u0631\u0648\u0631\u06cc \u0628\u0631\u0627\u06cc \u062a\u0633\u0644\u0637 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0645\u062f\u06cc\u0631 \u0633\u06cc\u0633\u062a\u0645 SSH \u0627\u0633\u062a. SSH \u06cc\u0627 Secure Shell&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-03T15:34:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-04T06:06:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/02\/03190304\/SSH-BG.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1793\" \/>\n\t<meta property=\"og:image:height\" content=\"1110\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631\",\"datePublished\":\"2024-02-03T15:34:45+00:00\",\"dateModified\":\"2024-02-04T06:06:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/\"},\"wordCount\":102,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/02\\\/03190304\\\/SSH-BG.jpg\",\"keywords\":[\"SSH\",\"\u0633\u0631\u0648\u0631\"],\"articleSection\":[\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"\u0633\u0631\u0648\u0631\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/\",\"name\":\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631 - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/02\\\/03190304\\\/SSH-BG.jpg\",\"datePublished\":\"2024-02-03T15:34:45+00:00\",\"dateModified\":\"2024-02-04T06:06:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/02\\\/03190304\\\/SSH-BG.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/02\\\/03190304\\\/SSH-BG.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-use-ssh-to-connect-to-a-remote-server\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/category\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"name\":\"\u0628\u0644\u0627\u06af ITPiran\",\"description\":\"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\",\"name\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"alternateName\":\"ITPIran Blog\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"width\":512,\"height\":512,\"caption\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/en\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use SSH to connect to a remote server - ITPiran Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/","og_locale":"en_US","og_type":"article","og_title":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631 - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 \u06cc\u06a9\u06cc \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0636\u0631\u0648\u0631\u06cc \u0628\u0631\u0627\u06cc \u062a\u0633\u0644\u0637 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0645\u062f\u06cc\u0631 \u0633\u06cc\u0633\u062a\u0645 SSH \u0627\u0633\u062a. SSH \u06cc\u0627 Secure Shell&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-02-03T15:34:45+00:00","article_modified_time":"2024-02-04T06:06:25+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/02\/03190304\/SSH-BG.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631","datePublished":"2024-02-03T15:34:45+00:00","dateModified":"2024-02-04T06:06:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/"},"wordCount":102,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/02\/03190304\/SSH-BG.jpg","keywords":["SSH","\u0633\u0631\u0648\u0631"],"articleSection":["\u0622\u0645\u0648\u0632\u0634\u06cc","\u0633\u0631\u0648\u0631"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/","name":"How to use SSH to connect to a remote server - ITPiran Blog","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/02\/03190304\/SSH-BG.jpg","datePublished":"2024-02-03T15:34:45+00:00","dateModified":"2024-02-04T06:06:25+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/02\/03190304\/SSH-BG.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/02\/03190304\/SSH-BG.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-use-ssh-to-connect-to-a-remote-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itpiran.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0622\u0645\u0648\u0632\u0634\u06cc","item":"https:\/\/www.itpiran.net\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 SSH \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0631\u0627\u0647 \u062f\u0648\u0631"}]},{"@type":"WebSite","@id":"https:\/\/www.itpiran.net\/blog\/#website","url":"https:\/\/www.itpiran.net\/blog\/","name":"ITPiran Blog","description":"Iranian Sustainable Trade News and Articles","publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itpiran.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.itpiran.net\/blog\/#organization","name":"Sustainable Iranian Business Blog","alternateName":"ITPIran Blog","url":"https:\/\/www.itpiran.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","contentUrl":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","width":512,"height":512,"caption":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81","name":"admin","url":"https:\/\/www.itpiran.net\/blog\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/14678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/comments?post=14678"}],"version-history":[{"count":1,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/14678\/revisions"}],"predecessor-version":[{"id":14679,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/14678\/revisions\/14679"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media\/14680"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media?parent=14678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/categories?post=14678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/tags?post=14678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}