{"id":5081,"date":"2020-08-14T14:07:03","date_gmt":"2020-08-14T12:07:03","guid":{"rendered":"https:\/\/blue.pri.ee\/ttu\/?page_id=5081"},"modified":"2024-06-14T15:11:17","modified_gmt":"2024-06-14T13:11:17","slug":"ssh-connection-guide","status":"publish","type":"page","link":"https:\/\/blue.pri.ee\/ttu\/resources\/ssh-connection-guide\/","title":{"rendered":"SSH connection guide"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/ssh-connection-guide\/#What_is_SSH\" >What is SSH?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/ssh-connection-guide\/#VPN_connection_to_the_university_intranet\" >VPN connection to the university intranet<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/ssh-connection-guide\/#SSH_connection_to_the_lab\" >SSH connection to the lab<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"What_is_SSH\"><\/span>What is SSH?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Secure_Shell\">https:\/\/en.wikipedia.org\/wiki\/Secure_Shell<\/a><\/p>\n<p>SSH is the most common protocol to create a secure connection to another device over the network. It may be a remote client like a Desktop PC, a server or even a microcomputer such as a Raspberry PI.<\/p>\n<p>In programming and some other specialized subjects you may need to create an SSH connection to either a lab computer or a server. This may include cases if you want to try out your software on the lab computers or you might not have the required software configuration on your own device. It may also become necessary in later subjects if you need access to licensed tools or specialized systems.<\/p>\n<p>To create a connection, you need to perform 2 steps:<\/p>\n<ol>\n<li>Create a VPN connection to the university intranet<\/li>\n<li>Create an SSH connection to the desired computer<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"VPN_connection_to_the_university_intranet\"><\/span>VPN connection to the university intranet<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>This is a mandatory step if you are outside of the university network. Direct access to university computers is not available, thus a VPN connection is required.<\/p>\n<p>To create a VPN connection, the university uses FortiVPN, that uses a client software called FortiClient. To download the client software, follow the IT Helpdesk article <strong><a href=\"https:\/\/taltech.atlassian.net\/wiki\/x\/WwFTAg\">https:\/\/taltech.atlassian.net\/wiki\/x\/WwFTAg<\/a><\/strong>. Client application may also be available through the VPN portal <strong><a href=\"https:\/\/vpn.taltech.ee\">vpn.taltech.ee<\/a><\/strong>.<\/p>\n<p><strong>NB! When the VPN connection is active, all the traffic between your computer and the internet goes through the university network and thus can be monitored by the university!<\/strong><\/p>\n<h3><span class=\"ez-toc-section\" id=\"SSH_connection_to_the_lab\"><\/span>SSH connection to the lab<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"su-tabs su-tabs-style-default su-tabs-mobile-stack\" data-active=\"1\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-tabs-nav\"><span class=\"\" data-url=\"\" data-target=\"blank\" tabindex=\"0\" role=\"button\">Linux, MacOS, Windows PowerShell (and modern cmd)<\/span><span class=\"\" data-url=\"\" data-target=\"blank\" tabindex=\"0\" role=\"button\">Windows (MobaXTerm)<\/span><\/div><div class=\"su-tabs-panes\"><div class=\"su-tabs-pane su-u-clearfix su-u-trim\" data-title=\"Linux, MacOS, Windows PowerShell (and modern cmd)\">\n<p>Most modern operating systems have built in SSH clients. To connect, you first need to find and execute the terminal application for your OS (i.e. terminal, console, command prompt, powershell, &#8230;). Once opened, you need to execute the SSH client and give it parameters for the connection. For this, you need to know the desired computer&#8217;s network address.<\/p>\n<div class=\"su-spoiler su-spoiler-style-fancy su-spoiler-icon-chevron su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Selecting the computer's network address<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">\n<p>You have access to two different configurations<\/p>\n<ol style=\"list-style-type: lower-alpha;\">\n<li>A server that is always available can be connected to by using the address <span class=\"lang:c highlight:0 decode:true crayon-inline\">lx0.pld.ttu.ee<\/span>. The software configuration on this machine might be a bit older and have minor differences to the lab computers.<\/li>\n<li>The lab computers have addresses with the naming style of\u00a0\u00a0 <span class=\"lang:c highlight:0 decode:true crayon-inline\">name.pld.ttu.ee<\/span> . To find the correct name, you need to find a lab computer that is currently in Linux. The status of all the computers and their names is available on\u00a0 <a href=\"https:\/\/ati.ttu.ee\/klassi-staatus\">https:\/\/ati.ttu.ee\/klassi-staatus<\/a>. All computers presently in Linux have a Tux image on them. I.e. the computer <span class=\"lang:c highlight:0 decode:true crayon-inline\">cx7<\/span>\u00a0 will have a\u00a0network address of\u00a0 <span class=\"lang:c highlight:0 decode:true crayon-inline\">cx7.pld.ttu.ee<\/span>.<br \/>\n<strong>NB!<\/strong> The lab computers might be physically restarted in the classroom by other students if they need to use Windows!<\/li>\n<\/ol>\n<\/div><\/div>\n<p>In this example, a connection to the institute&#8217;s Linux based server will be created. Replace the &#8220;uni-id&#8221; in the connection parameters with your own uni-id.\u00a0 To connect to\u00a0 lab computers, replace the address with the desired computer&#8217;s network address.<\/p>\n<pre class=\"toolbar:2 nums:false lang:c highlight:0 decode:true\">ssh -X uni-id@lx0.pld.ttu.ee<\/pre>\n<p><strong>Note 1:<\/strong> If you haven&#8217;t connected to that particular computer before, you will have to confirm that you trust the fingerprint of that computer!<br \/>\n<strong>Note 2:<\/strong> When entering your password, you will not have any typing indicators (not even asterisks).\u00a0 This is for security purposes.<br \/>\n<strong>Note 3:<\/strong> We use the argument -X to allow us to use graphical programs. You don&#8217;t need to add it if you only intend to use the terminal.<\/p>\n<p><a href=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240531_190954.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9423 size-full\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240531_190954.png\" alt=\"\" width=\"482\" height=\"175\" srcset=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240531_190954.png 482w, https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240531_190954-300x109.png 300w\" sizes=\"auto, (max-width: 482px) 100vw, 482px\" \/><\/a><\/p>\n<p>You&#8217;re in! Now you can use the computer like you were in the lab class with the same software setup &#8211; as long as you run it from the terminal!<\/p>\n<\/div>\n<div class=\"su-tabs-pane su-u-clearfix su-u-trim\" data-title=\"Windows (MobaXTerm)\">\n<p>This is the simplest way to create an SSH connection from Windows that allows you to use graphical applications.<\/p>\n<ol>\n<li>Download and install MobaXTerm: <a href=\"https:\/\/mobaxterm.mobatek.net\/\">https:\/\/mobaxterm.mobatek.net\/<\/a><\/li>\n<li>Set up the connection.<br \/>\n<a href=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2020\/08\/ssh-moba-sess.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5102\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2020\/08\/ssh-moba-sess.png\" alt=\"\" width=\"298\" height=\"131\" \/><\/a><br \/>\nSession type: SSH<br \/>\nRemote host: lx0.intra.ttu.ee<br \/>\n<div class=\"su-spoiler su-spoiler-style-fancy su-spoiler-icon-chevron su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Selecting the computer's network address<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">You have access to two different configurations<\/p>\n<ol style=\"list-style-type: lower-alpha;\">\n<li>A server that is always available can be connected to by using the address <span class=\"lang:c highlight:0 decode:true crayon-inline\">lx0.pld.ttu.ee<\/span>. The software configuration on this machine might be a bit older and have minor differences to the lab computers.<\/li>\n<li>The lab computers have addresses with the naming style of\u00a0\u00a0 <span class=\"lang:c highlight:0 decode:true crayon-inline\">name.pld.ttu.ee<\/span> . To find the correct name, you need to find a lab computer that is currently in Linux. The status of all the computers and their names is available on\u00a0 <a href=\"https:\/\/ati.ttu.ee\/klassi-staatus\">https:\/\/ati.ttu.ee\/klassi-staatus<\/a>. All computers presently in Linux have a Tux image on them. I.e. the computer <span class=\"lang:c highlight:0 decode:true crayon-inline\">cx7<\/span>\u00a0 will have a\u00a0network address of\u00a0 <span class=\"lang:c highlight:0 decode:true crayon-inline\">cx7.pld.ttu.ee<\/span>.<br \/>\n<strong>NB!<\/strong> The lab computers might be physically restarted in the classroom by other students if they need to use Windows!<\/li>\n<\/ol>\n<\/div><\/div>\n<p>Username: Uni-ID (replace with yours)<br \/>\n<a href=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240611_164006.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9417\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240611_164006.png\" alt=\"\" width=\"889\" height=\"607\" srcset=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240611_164006.png 889w, https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240611_164006-300x205.png 300w, https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/Screenshot_20240611_164006-768x524.png 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><\/a><strong>Note 1:<\/strong> Once the connection is made, it is automatically saved. You don&#8217;t need to do this initial setup the next time.<br \/>\n<strong>Note 2:<\/strong> Once the connection is established, you will need to enter your password. There is no typing indicator for the password for security reasons.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/moba_logged_in.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9421\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/moba_logged_in.png\" alt=\"\" width=\"909\" height=\"600\" srcset=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/moba_logged_in.png 909w, https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/moba_logged_in-300x198.png 300w, https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2024\/06\/moba_logged_in-768x507.png 768w\" sizes=\"auto, (max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p>You&#8217;re in! Now you can use the computer like you were in the lab class with the same software setup &#8211; as long as you run it from the terminal!<\/p>\n<\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>What is SSH? https:\/\/en.wikipedia.org\/wiki\/Secure_Shell SSH is the most common protocol to create a secure connection to another device over the network. It may be a remote client like a Desktop PC, a server or even a microcomputer such as a Raspberry PI. In programming and some other specialized subjects you may need to create an &hellip; <a href=\"https:\/\/blue.pri.ee\/ttu\/resources\/ssh-connection-guide\/\" class=\"more-link\">Loe edasi <span class=\"screen-reader-text\">SSH connection guide<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1439,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"page-templates\/code-width-wide.php","meta":{"footnotes":""},"class_list":["post-5081","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages\/5081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/comments?post=5081"}],"version-history":[{"count":6,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages\/5081\/revisions"}],"predecessor-version":[{"id":9427,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages\/5081\/revisions\/9427"}],"up":[{"embeddable":true,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages\/1439"}],"wp:attachment":[{"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/media?parent=5081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}