{"id":187,"date":"2016-05-03T10:25:47","date_gmt":"2016-05-03T08:25:47","guid":{"rendered":"https:\/\/wpethzprd.ethz.ch\/isgdmath\/?p=187"},"modified":"2023-05-17T10:42:54","modified_gmt":"2023-05-17T08:42:54","slug":"sftp","status":"publish","type":"post","link":"https:\/\/blogs.ethz.ch\/isgdmath\/sftp\/","title":{"rendered":"Secure File Transfer (SFTP) to the D-MATH network"},"content":{"rendered":"<p class=\"p\">SFTP can be used on all platforms, incl. Linux, Windows and Mac to transfer files to \/ from the D-MATH fileservers.<\/p>\n<p class=\"p\">Instructions for each platform can be found here:<\/p>\n<ul class=\"square\">\n<li><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/sftp\/#linux\">Linux \/ Mac OS X \/ Windows<\/a>&nbsp;(with GUI)<\/li>\n<li><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/sftp\/#osx\">Mac OS X<\/a> (with GUI)<\/li>\n<li><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/sftp\/#windows\">Windows<\/a> (with GUI)<\/li>\n<li><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/sftp\/#commandline\">Commandline<\/a> (also Mac OS X and all Unix)<\/li>\n<\/ul>\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"linux\">Linux \/ Mac OS X \/ Windows<\/h2>\n\n\n\n<p>1) Open the application filezilla, if you need to install it you can download it from:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li> <a href=\"https:\/\/filezilla-project.org\/\">https:\/\/filezilla-project.org\/<\/a><\/li>\n<\/ul>\n\n\n\n<p>2) With the following information you can connect<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Host: sftp:\/\/sftpmath.math.ethz.ch<\/li>\n\n\n\n<li>Username: [your username]<\/li>\n\n\n\n<li>Password: [D-MATH password]<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-11.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-11-1390x900.png\" alt=\"\" class=\"wp-image-660\" width=\"444\" height=\"287\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>3) Click on the button &#8220;Quickconnect&#8221;<br>4) You may need to trust the ssh host key of the server to be able to connect<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-31.png\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"279\" src=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-31-600x279.png\" alt=\"\" class=\"wp-image-662\" srcset=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-31-600x279.png 600w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-31-300x139.png 300w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-31.png 618w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p><br>5) Once you are connected you can transfer files from the remote site (right side) to your computer (left side)<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-47.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/Screenshot-from-2019-12-04-09-43-47-1390x900.png\" alt=\"\" class=\"wp-image-663\" width=\"423\" height=\"273\" \/><\/a><\/figure>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"windows\">Windows<\/h2>\n\n\n\n<p>1) One of the SFTP clients for Windows is called WinSCP and can be downloaded here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/winscp.net\/eng\/download.php\" target=\"_blank\">https:\/\/winscp.net\/eng\/download.php<\/a><\/li>\n<\/ul>\n\n\n\n<p>2) Open WinSCP and use the following settings under &#8220;Basic&#8221;, replacing &#8220;username&#8221; and &#8220;password&#8221; with your D-MATH details<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"346\" height=\"380\" src=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_1.jpg\" alt=\"winscp_1\" class=\"wp-image-192\" srcset=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_1.jpg 346w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_1-273x300.jpg 273w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>3) Next we want to save our login details. Under &#8220;Stored sessions&#8221; click on &#8220;save&#8221; and enter an appropriate name, e.g. sftpmath. Save with &#8220;OK&#8221; then click on Login. Next time you use this program just double-click on the stored session name<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_2.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"347\" height=\"384\" src=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_2.jpg\" alt=\"winscp_2\" class=\"wp-image-193\" srcset=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_2.jpg 347w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_2-271x300.jpg 271w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>4) The first time you connect to sftpmath.math.ethz.ch, the security key must be accepted, click Yes here<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_3.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"181\" src=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_3.jpg\" alt=\"winscp_3\" class=\"wp-image-194\" srcset=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_3.jpg 680w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_3-300x80.jpg 300w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_3-624x166.jpg 624w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>5) After logging in, your local windows home directory is on the left and your D-MATH home is on the right. To download\/upload a file, just double-click it<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_4.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"503\" src=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_4.jpg\" alt=\"winscp_4\" class=\"wp-image-195\" srcset=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_4.jpg 655w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_4-300x230.jpg 300w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/winscp_4-624x479.jpg 624w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/><\/a><\/figure>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"osx\">Mac OS X<\/h2>\n\n\n\n<p>1) One of the SFTP-Clients for Mac OS X is called Cyberduck and can be downloaded from <a href=\"http:\/\/cyberduck.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">cyberduck.io<\/a>; unzip the file and drag-and-drop Cyberduck into the Applications Folder.<\/p>\n\n\n\n<p>2) Start the application, click on &#8220;Open Connection&#8221; and enter following information:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Drop-Down Menu: SFTP (SSH File Transfer Protocol)\n\nServer   : sftpmath.math.ethz.ch\nUsername : your username\nPassword : your password\n[x] Add to Keychain (&lt;== up to you)\n\nMore Options:\nPath     : home\n[ ] Use Public Key Authentiation (&lt;== up to you)\n<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/cyberduck.png\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"529\" src=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/cyberduck.png\" alt=\"cyberduck\" class=\"wp-image-198\" srcset=\"https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/cyberduck.png 600w, https:\/\/blogs.ethz.ch\/isgdmath\/files\/2016\/05\/cyberduck-300x265.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>3) Click on &#8220;Connect&#8221; and then accept the host key fingerprint by also checking the &#8220;Always&#8221; checkbox.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"commandline\">Commandline<\/h2>\n\n\n\n<p>Follow these steps.<\/p>\n\n\n\n<p>1) Open a terminal (xterm, gnome-terminal, &#8230;) and<\/p>\n\n\n\n<p>2) Login<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">name@shell# sftp username@sftpmath.math.ethz.ch<\/pre>\n\n\n\n<p>3) On the first login, you will be asked to accept the sftpmath public server key, this should be accepted with &#8220;yes&#8221; (more about ssh key fingerprints at: <a href=\"https:\/\/blogs.ethz.ch\/isgdmath\/ssh-key-fingerprints\/\" target=\"_blank\" rel=\"noreferrer noopener\">ssh-key-fingerprints<\/a>):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">The authenticity of host 'sftpmath (129.132.119.199)' can't be established.\nRSA key fingerprint is SHA256:o8jYLjJZIkG8+V474HcSdUVJTvSjYOYT3qQi8+8kFtE.\nAre you sure you want to continue connecting (yes\/no)?<\/pre>\n\n\n\n<p>then you will be asked for your D-MATH password:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Welcome to the 'sftp'-, 'scp'-, 'rsync'-, 'unison'-, 'svn'- &amp; 'git'-server of\nthe Mathematics Department of ETH Zurich.\n\nYour directories:\n  home : your 'home' directory (~)\n  www&nbsp; : your 'www'&nbsp; directory (~\/www)\n  ftp&nbsp; : your 'ftp'&nbsp; directory (~\/ftp)\n\n  =&gt; ex.: type \"cd home\".\n\nusername@sftpmath.ethz.ch's password:\n<\/pre>\n\n\n\n<p>After having logged in you can access your home, ftp and www dirctories. To <strong>download<\/strong> a file, use the command &#8220;<strong>get<\/strong>&#8220;. To <strong>upload<\/strong> a file from the local directory where you logged in from, use the command &#8220;<strong>put<\/strong>&#8220;.<\/p>\n\n\n\n<p>Following other commands can also be used on the sftpmath server:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cp, ls, mv, rm, scp, help, ...<\/pre>\n\n\n\n<p>An alternative to logging in interactively to the sftpmath server and using the above-mentioned sftp commands, is using <strong>scp<\/strong>. To download a file <em>abc.zzz<\/em> from the home directory on sftpmath to a local directory:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">name@shell# scp username@sftpmath.math.ethz.ch:\/home\/abc.zzz .<\/pre>\n\n\n\n<p>Don&#8217;t forget the &#8220;.&#8221; at the end of the command which symbolizes the local directory to download to!<\/p>\n\n\n\n<p>To upload a file <em>cba.zzz<\/em> from the current&nbsp;local directory to the sftpmath home directory:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">name@shell# scp cba.zzz username@sftpmath.math.ethz.ch:\/home\/.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SFTP can be used on all platforms, incl. Linux, Windows and Mac to transfer files to \/ from the D-MATH fileservers. Instructions for each platform can be found here: Linux \/ Mac OS X \/ Windows&nbsp;(with GUI) Mac OS X (with GUI) Windows (with GUI) Commandline (also Mac OS X and all Unix) Linux \/ [&hellip;]<\/p>\n","protected":false},"author":43853,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[198218,197476],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-home-office","category-ssh"],"_links":{"self":[{"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/users\/43853"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":0,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}