{"id":4832,"date":"2018-07-16T13:32:53","date_gmt":"2018-07-16T12:32:53","guid":{"rendered":"https:\/\/www.oderland.se\/support\/?post_type=ht_kb&#038;p=4832"},"modified":"2025-02-17T10:54:54","modified_gmt":"2025-02-17T09:54:54","slug":"how-do-i-connect-to-my-web-hosting-account-using-ssh","status":"publish","type":"ht_kb","link":"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-connect-to-my-web-hosting-account-using-ssh\/","title":{"rendered":"How do I connect to my web hosting account using SSH?"},"content":{"rendered":"\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\">Only the main user of a cPanel account can connect via SSH to the service. Thus, users created via the <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-does-the-manage-team-feature-work-on-web-hosting-accounts\/\" data-type=\"ht_kb\" data-id=\"23508\" target=\"_blank\" rel=\"noreferrer noopener\">Manage Team feature<\/a> cannot manage a web hosting account via SSH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Via cPanel<\/h2>\n\n\n\n<p>You can always access a terminal through cPanel. Please follow these instructions to do this:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a rel=\"noopener noreferrer\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-login-to-cpanel\/\" target=\"_blank\">Login to cPanel<\/a>.<\/li>\n\n\n\n<li>Click on the icon called&nbsp;<code>Terminal<\/code>&nbsp;under the <code>Advanced<\/code><strong>&nbsp;<\/strong>section.<br><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_terminal.png\"><img loading=\"lazy\" decoding=\"async\" width=\"691\" height=\"311\" class=\"wp-image-19204\" style=\"width: 691px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_terminal.png\" alt=\"\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_terminal.png 691w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_terminal-300x135.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_terminal-50x23.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_terminal-60x27.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_terminal-100x45.png 100w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/a><\/li>\n\n\n\n<li>A warning will appear on the next page if you have not used the terminal before. If you are comfortable using a terminal and want to go ahead, click the blue button.<br><figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_055.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4835\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_055.png\" alt=\"cPanel Terminal Warning\" width=\"842\" height=\"285\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_055.png 842w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_055-300x102.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_055-768x260.png 768w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_055-50x17.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_055-60x20.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_055-100x34.png 100w\" sizes=\"auto, (max-width: 842px) 100vw, 842px\" \/><\/a><\/figure><\/li>\n\n\n\n<li>You now have complete access to your account through the terminal.<br><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_opened_terminal.png\"><img loading=\"lazy\" decoding=\"async\" width=\"586\" height=\"555\" class=\"wp-image-15577\" style=\"width: 586px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_opened_terminal.png\" alt=\"\"><\/a><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Via SSH client<\/h2>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Keep in mind that you always must use your cPanel username when logging on via SSH.<\/p>\n\n\n\n<p>To connect with SSH to our servers you are required to use keys. This guide will walk you through how to create a public key which is stored on the server along with a private key that is stored on your computer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create a key pair<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-login-to-cpanel\/\" target=\"_blank\" rel=\"noopener noreferrer\">Login to&nbsp;cPanel<\/a>.<\/li>\n\n\n\n<li>Click the <code>SSH Access<\/code> icon in the&nbsp;<code>Security<\/code> section.<br><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_ssh_access.png\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"256\" class=\"wp-image-19206\" style=\"width: 702px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_ssh_access.png\" alt=\"\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_ssh_access.png 702w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_ssh_access-300x109.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_ssh_access-50x18.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_ssh_access-60x22.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_icon_ssh_access-100x36.png 100w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/a><\/li>\n\n\n\n<li>Click on <code>Manage SSH Keys<\/code>.<br><figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_057.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4839 size-full\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_057.png\" alt=\"Manage SSH Keys\" width=\"286\" height=\"159\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_057.png 286w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_057-50x28.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_057-60x33.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_057-100x56.png 100w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/a><\/figure><\/li>\n\n\n\n<li>Click on <code>Generate a New Key<\/code>.<br><figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_058.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4841 size-full\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_058.png\" alt=\"Generate a New Key\" width=\"323\" height=\"109\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_058.png 323w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_058-300x101.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_058-50x17.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_058-60x20.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_058-100x34.png 100w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/a><\/figure><\/li>\n\n\n\n<li>You now need to fill out the following information:\n<ul class=\"wp-block-list\">\n<li><strong>Key Name:<\/strong>&nbsp;You can choose any name you wish, for example &#8220;id_rsa&#8221; which is the default name.<\/li>\n\n\n\n<li><strong>Key Password: <\/strong>A password for your private key. The strength has to be over 50 for the password to be accepted.<\/li>\n\n\n\n<li><strong>Reenter Password: <\/strong>Enter the same password again.<\/li>\n\n\n\n<li><strong>Key Type:&nbsp;<\/strong>RSA.<\/li>\n\n\n\n<li><strong>Key Size:&nbsp;<\/strong>We recommend using 4096 bit.<br><figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_059.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4843\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_059.png\" alt=\"Generating a Piublic Key\" width=\"1020\" height=\"615\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_059.png 1020w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_059-300x181.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_059-768x463.png 768w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_059-50x30.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_059-60x36.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_059-100x60.png 100w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/a><\/figure><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>You can now generate the key by clicking <code>Generate Key<\/code>.<\/li>\n<\/ol>\n\n\n\n<p>If you click on <code>Go Back<\/code>&nbsp;you will return to the page with your SSH keys. There should now be two keys there, one public and one private.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Activating the Key<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>On the <code>Manage SSH keys<\/code> page you need to click on&nbsp;<code>Manage<\/code>&nbsp;to the right of your public key.<br><figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_060.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4845\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_060.png\" alt=\"Public Key - Manage\" width=\"365\" height=\"88\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_060.png 365w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_060-300x72.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_060-50x12.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_060-60x14.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_060-100x24.png 100w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><\/a><\/figure><\/li>\n\n\n\n<li>Then click on&nbsp;<code>Authorize<\/code>.<figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_061.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4847\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_061.png\" alt=\"Authorize\" width=\"212\" height=\"84\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_061.png 212w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_061-50x20.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_061-60x24.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_061-100x40.png 100w\" sizes=\"auto, (max-width: 212px) 100vw, 212px\" \/><\/a><\/figure><\/li>\n\n\n\n<li>The SSH key is now authorized to access your account, you can click <code>Go Back<\/code>&nbsp;to get back to the <code>Manage SSH keys<\/code> page.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Download the private key<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>On the <code>Manage SSH Keys<\/code> page click on&nbsp;<code>View\/Download<\/code>&nbsp;to the right of the private key.<br><figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_062.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4850\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_062.png\" alt=\"View\/Download\" width=\"518\" height=\"140\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_062.png 518w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_062-300x81.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_062-50x14.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_062-60x16.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_062-100x27.png 100w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/a><\/figure><\/li>\n\n\n\n<li>If you are going to use PuTTY you will have to convert your key into PuTTY-format. If you are not going to use Putty you can skip to step 4.<\/li>\n\n\n\n<li>For Putty users. In the field&nbsp;<code>Enter the passphrase to unlock the \"key name\" key for conversion<\/code> you need to enter the password for your private key which you set when you created it. Then click <code>Convert<\/code>.<figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_063.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4853 size-full\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_063.png\" alt=\"Enter The passphrase\" width=\"706\" height=\"160\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_063.png 706w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_063-300x68.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_063-50x11.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_063-60x14.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/Selection_063-100x23.png 100w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/a><\/figure><\/li>\n\n\n\n<li>Click on <code>Download Key<\/code>&nbsp;to save the key some where on your computer.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\">When the private key has been saved to your computer it is important that you click <code>Delete<\/code> to remove the private key from the server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Set up PuTTY (Windows)<\/h3>\n\n\n\n<p>If you are running Windows 8.1 or earlier you can use a program called PuTTY to connect with SSH to the server. If you don&#8217;t have PuTTY you can download it&nbsp;<a title=\"Puttys hemsida\" href=\"http:\/\/www.putty.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. To set up PuTTY to use your private key you need to follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open up PuTTY and load the session you want to edit the settings for. If you do not have any session saved since earlier you can go to next step.<\/li>\n\n\n\n<li>Click on <code>Connection<\/code> -&gt; <code>SSH<\/code> -&gt; <code>Auth<\/code>.<figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/putty-auth.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-343 size-full\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/putty-auth.png\" width=\"424\" height=\"130\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/putty-auth.png 424w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/putty-auth-300x92.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/putty-auth-50x15.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/putty-auth-60x18.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/putty-auth-35x11.png 35w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/a><\/figure><\/li>\n\n\n\n<li>Click on <code>Browse<\/code>&nbsp;and find the private key file you downloaded and saved from the server earlier.<\/li>\n\n\n\n<li>Go back to <code>Session<\/code>&nbsp;and click <code>Save<\/code>. If you do not already have a session you need to enter a name before you click <code>Save<\/code>.<\/li>\n\n\n\n<li>In the field&nbsp;<code>Host Name<\/code> you need to enter the name of the server you are going to connect to. You can find the host name you need to use by following <a title=\"Vilken server ligger mitt konto p\u00e5?\" rel=\"noopener noreferrer\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/which-server-is-my-web-hosting-account-located-on\/\" target=\"_blank\">this guide<\/a>.<\/li>\n\n\n\n<li>Click <code>Open<\/code>&nbsp;to start the SSH session.<\/li>\n\n\n\n<li>If you configured everything correctly PuTTY will now ask you if you trust the server, enter <code>yes<\/code>.<\/li>\n\n\n\n<li>PuTTY should now ask for your username, you will need to type in your cPanel username. If you do not know which cPanel username you have you can follow&nbsp;<a rel=\"noopener noreferrer\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-reset-the-password-for-cpanel\/#via-the-client-area\" target=\"_blank\">this guide<\/a> all the way to step four to find out.<\/li>\n\n\n\n<li>At last PuTTY will ask you for the password for your private key. It is the same password as you entered when you created the key pair in cPanel (<a href=\"#create-a-key-pair\">as described above<\/a>).<\/li>\n\n\n\n<li>You should now be logged in to your account over SSH.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Connecting with PageAnt (Windows)<\/h3>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">PageAnt requires that you already have PuTTY installed.<\/p>\n\n\n\n<p>PageAnt is a program that keeps track of your keys. Every time PageAnt starts you can add your key (you will have to enter the password for the key). With PageAnt running you can make connections with PuTTY without having to enter your password every time you connect to a server.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Download PageAnt from Puttys <a rel=\"noreferrer noopener\" href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html\" target=\"_blank\">website<\/a>.<\/p>\n\n\n\n<p>When PageAnt has been installed you should get an icon (looking like a computer with a hat on) in Windows Task Bar. Right click on the icon and then click <code>Add Key<\/code>, choose the private key file which you downloaded earlier.<\/p>\n\n\n\n<figure class=\"wp-block-image is-style-default\"><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-addkey.png\"><img loading=\"lazy\" decoding=\"async\" width=\"213\" height=\"243\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-addkey.png\" alt=\"\" class=\"wp-image-341\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-addkey.png 213w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-addkey-44x50.png 44w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-addkey-53x60.png 53w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-addkey-31x35.png 31w\" sizes=\"auto, (max-width: 213px) 100vw, 213px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"227\" height=\"136\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-passw.png\" alt=\"\" class=\"wp-image-342\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-passw.png 227w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-passw-50x30.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-passw-60x36.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-passw-35x21.png 35w\" sizes=\"auto, (max-width: 227px) 100vw, 227px\" \/><\/figure>\n\n\n\n<p><br>You also have to enter the password for your private key.<br><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/pageant-passw.png\"><br><\/a><\/p>\n\n\n\n<p>Now you should be able to connect to the server with PuTTY without having to enter your password.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Connecting with SSH in Terminal (Unix\/Linux\/Mac\/Windows 10)<\/h3>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">For Mac users you can find the Terminal through Finder by searching for the word &#8220;terminal&#8221;.<br><br>If you are using Windows 10 you can use <a rel=\"noreferrer noopener\" href=\"https:\/\/www.howtogeek.com\/249966\/how-to-install-and-use-the-linux-bash-shell-on-windows-10\/\" target=\"_blank\">Bash on Windows 10<\/a> (WSL) to get access to the SSH client.<\/p>\n\n\n\n<p>To use the private key you downloaded earlier you can add the -i flag to the ssh command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh -v -i \/path\/to\/private_key cpanelusername@servername<\/pre>\n\n\n\n<p>If you don&#8217;t know which cPanel username you have you can follow&nbsp;<a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-reset-the-password-for-cpanel\/#via-the-client-area\" target=\"_blank\" rel=\"noopener noreferrer\">this guide<\/a> all the way to step four to find out.<\/p>\n\n\n\n<p>If you don&#8217;t know which server name to use you can follow <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/which-server-is-my-web-hosting-account-located-on\/\" target=\"_blank\" rel=\"noopener noreferrer\">this guide<\/a> to find out.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">The private key on your computer should only be readable by your user. You can run <code>chmod 600 \/path\/to\/key<\/code> to achieve this (replacing \/path\/to\/key with the path and name of the file containing the private key).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If you get disconnected too often<\/h3>\n\n\n\n<p>Sometimes when you connect via SSH and leave the connection idle for a while, the server may disconnect automatically. This is normal, but if you think that the server is a bit to aggressive when it comes to automatic disconnects, you may need to adjust your connection settings.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Using Putty (Windows)<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>To adjust the setting regarding connection timeout in Putty, you need to edit the session you <a href=\"#set-up-putty-windows\">created above<\/a>.<\/li>\n\n\n\n<li>In the pane <code>Category<\/code>, go to <code>Connection<\/code>. Under <code>Sending of null packets to keep session active<\/code>, enter <strong>240<\/strong> for <code>Seconds between keepalives<\/code>.<br><br><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/01\/putty_connection.png\"><img loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"434\" class=\"wp-image-11663\" style=\"width: 446px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/01\/putty_connection.png\" alt=\"\"><\/a><\/li>\n\n\n\n<li>Now, click <code>Session<\/code> under <code>Category<\/code> and then on <code>Save<\/code>.<\/li>\n\n\n\n<li>Test your connection and leave it connected for a while to test the timeout. If the server still disconnects too often for your taste, edit <code>Seconds between keepalives<\/code> to a lower number in steps to find the value that suits your needs.<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Using Unix\/Linux\/Mac\/Windows 10 with bash<\/h4>\n\n\n\n<p>Edit the file <code>~\/.ssh\/config<\/code> (or create it if it doesn&#8217;t exist yet) on the device you&#8217;re connecting from:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Host <code>servername.oderland.com<\/code>\n    Hostname <code>servername.oderland.com<\/code>\n    ServerAliveInterval 240\n    ServerAliveCountMax 2<\/pre>\n\n\n\n<p>If you do not wish to edit the config file, you can use the same settings directly in your command when you connect:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh -i \/path\/to\/private_key -o ServerAliveInterval=240 -o ServerAliveCountMax=2 cpanelusername@<code>servername.oderland.com<\/code><\/pre>\n\n\n\n<p>Regardless if you&#8217;re using the config file or the connection command above, swap out <code>servername.oderland.com<\/code> with the <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/which-server-is-my-web-hosting-account-located-on\/\">correct server name for the account<\/a>.<\/p>\n\n\n\n<p>Test your connection and leave it connected for a while to test the timeout. If the server still disconnects too often for your taste, edit <code>ServerAliveInterval<\/code> to a lower number in steps to find the value that suits your needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Via cPanel You can always access a terminal through cPanel. Please follow these instructions to do this: Via SSH client To connect with SSH to our servers you are required to use keys. This guide will walk you through how to create a public key which is stored on the&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"ht-kb-category":[214],"ht-kb-tag":[],"class_list":["post-4832","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-cpanel-whm"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/4832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/comments?post=4832"}],"version-history":[{"count":38,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/4832\/revisions"}],"predecessor-version":[{"id":24056,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/4832\/revisions\/24056"}],"wp:attachment":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/media?parent=4832"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-category?post=4832"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=4832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}