The Databar System at DTU - G-Bar Wiki

The Databar System at DTU - G-Bar Wiki The Databar System at DTU - G-Bar Wiki

31.10.2012 Views

20 The Databar System at DTU 1 (on a Danish keyboard it is to the left of Backspace, when pressing Shift). The procedure outlined above is the (only!) recommended way to access the G-Bar with ssh. With ssh you have a lot of other possibilities such as portforwarding, forwarding of X11 sessions etc. If you are interested in these options, go to the G-Bar homepage or http://www.google.com/. In Windows, it is also possible to use ssh, although a third-party application such as PuTTY is needed. You can download it at http://www.chiark.greenend.org.uk/, and it is ready to go right away. To use the client, you enter the name of the server you want to connect with, and the protocol that you want to use. Example: To connect to the G-Bar, use the following: • Hostname – login.gbar.dtu.dk (〈servername〉.gbar.dtu.dk ) • Protocol – SSH 6.8.2 Transferring files by internet In most instances, you will have files that you want to work at when you are at home and at the G-Bar. Some like to use a diskette or a USB memory stick. But lots of people at DTU just e-mail the files to themselves and then retrieve them from their DTU mail. These solutions work all right in most cases, but there is a much easier, faster, and more secure way to do it, which you can learn about in the next section. gftp The G-Bar has a graphic FTP client, called gftp. The client starts either from the menu or with the command gftp, upon which a window opens up something like the one in figure 4. Users who do not need a graphic client can use the classic command ftp or the somewhat more advanced ncftp. Note: FTP is a non-encryptd protocol. This means, all data (including user ID and password) are sent through the internet unencrypted. Therefore, use the encrypted SFTP (SSH) protocol! scp scp stands for Secure CoPy and can be used, as the name implies, to transfer files securely. This option is secure because all traffic is encrypted, often with ssh. For the most part, the scp command is very similar to that of cp, and it is scp 〈source〉 〈destination〉. Copying local files to a remote computer: n-62-14-4(s001234) $ scp fil bruger@server:dir/file or copying a file from a remote computer to the local server:

6 The G-Bar 21 Figure 4: Screenshot of gftp n-62-14-4(s001234) $ scp bruger@server:dir/fil fil For Windows users, the graphic client WinSCP can be recommended, and it can be downloaded at http://winscp.net/eng/. As you can see in the Win- SCP screenshot (Figure 5), the window is divided in two sections. The local files are on the left side, and the remote files on the right. All you have to do is “drag” the files from one side to the other to copy them back and forth. They will be copied in the background with the command scp, which is encrypted with ssh. 6.9 Job processing This section is about the commands to use when you are running programs on G-Bar, for example, in order to manage these processes. Remember not to overload the system when processing a large number of jobs and/or running parallel programs. It is permitted to do small test runs on up to four processors for a short time (max. 10-15 minutes). Larger runs must be processed under the control of a batch system. Read more about this at http://www.cc.dtu.dk/?page_id=12. 6.9.1 List of processes – ps ps shows a list of the processes running on the machine that is currently in use. Here is an example:

20 <strong>The</strong> <strong>D<strong>at</strong>abar</strong> <strong>System</strong> <strong>at</strong> <strong>DTU</strong><br />

1 (on a Danish keyboard it is to the left of Backspace, when pressing Shift). <strong>The</strong><br />

procedure outlined above is the (only!) recommended way to access the G-<strong>Bar</strong><br />

with ssh.<br />

With ssh you have a lot of other possibilities such as portforwarding, forwarding<br />

of X11 sessions etc. If you are interested in these options, go to the<br />

G-<strong>Bar</strong> homepage or http://www.google.com/.<br />

In Windows, it is also possible to use ssh, although a third-party<br />

applic<strong>at</strong>ion such as PuTTY is needed. You can download it <strong>at</strong><br />

http://www.chiark.greenend.org.uk/, and it is ready to go right away. To<br />

use the client, you enter the name of the server you want to connect with, and<br />

the protocol th<strong>at</strong> you want to use. Example: To connect to the G-<strong>Bar</strong>, use the<br />

following:<br />

• Hostname – login.gbar.dtu.dk (〈servername〉.gbar.dtu.dk )<br />

• Protocol – SSH<br />

6.8.2 Transferring files by internet<br />

In most instances, you will have files th<strong>at</strong> you want to work <strong>at</strong> when you are <strong>at</strong><br />

home and <strong>at</strong> the G-<strong>Bar</strong>. Some like to use a diskette or a USB memory stick. But<br />

lots of people <strong>at</strong> <strong>DTU</strong> just e-mail the files to themselves and then retrieve them<br />

from their <strong>DTU</strong> mail. <strong>The</strong>se solutions work all right in most cases, but there is<br />

a much easier, faster, and more secure way to do it, which you can learn about<br />

in the next section.<br />

gftp <strong>The</strong> G-<strong>Bar</strong> has a graphic FTP client, called gftp.<br />

<strong>The</strong> client starts either from the menu or with the command gftp, upon<br />

which a window opens up something like the one in figure 4.<br />

Users who do not need a graphic client can use the classic command ftp or<br />

the somewh<strong>at</strong> more advanced ncftp.<br />

Note: FTP is a non-encryptd protocol. This means, all d<strong>at</strong>a (including user<br />

ID and password) are sent through the internet unencrypted. <strong>The</strong>refore, use<br />

the encrypted SFTP (SSH) protocol!<br />

scp scp stands for Secure CoPy and can be used, as the name implies, to<br />

transfer files securely. This option is secure because all traffic is encrypted,<br />

often with ssh. For the most part, the scp command is very similar to th<strong>at</strong> of<br />

cp, and it is scp 〈source〉 〈destin<strong>at</strong>ion〉.<br />

Copying local files to a remote computer:<br />

n-62-14-4(s001234) $ scp fil bruger@server:dir/file<br />

or copying a file from a remote computer to the local server:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!