putty instruction

Upload: vidyakumar-subramaniam

Post on 14-Apr-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Putty Instruction

    1/14

    - 1 -

    Putty:

    What is PuTTY?PuTTY is a client program for the Secure Shell (SSH), Telnet and Rlogin using network protocols.These

    use remote session on a computer over the network. PuTTY implements the client end session at which thesession is displayed, rather than the end at which it runs.

    How does it work?

    By double clicking PuTTY icon Putty.exe , it opens a window. Then, anything you type into that window is sentstraight to the UNIX server and everything the UNIX server sends back is displayed in the window. Byhaving internet connection, you can work on the server from any part of the world.

    System Requirements.PuTTY is very small program and can run any of these operating systems Microsoft Windows 95, 98, NT,

    ME, 2000, and XP; Unix. PuTTY also requires having steady internet connection (Dial up or Broadband, orLAN connection) to communicate with UNIX server.

    Download and Install.It is easily available freeware software. If you search Download Putty in search engine like google,

    yahoo, you will find easily. PuTTY can be downloaded by click on the following link.http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

    Since PuTTY is executeable software, so it does not require specific installation. To run PuTTY, double

    click on the PuTTY icon.

    Putty.exe Figure 1: Putty Icon

  • 7/29/2019 Putty Instruction

    2/14

    - 2 -

    Confugring PuTTY:PuTTY can be configured by following steps.

    1. As show in the Figure 2, on the SESSION Tab (check to make sure it is highlighted up in the upperleft hand corner), enter login.ncsu.edu (cs.ucok.edu for UCO) under Host Name.

    2. Select the SSH radio button under Protocol.

    Figure 2: PuTTY Configuration

    3. Look to the left column and click on SSH. A gray box will form around it and the window willchange.

    4. Click the Enable Compression checkbox.5. Select the Preferred SSH protocol version to radio button.6. Under Encryption Options, select (click on it and it will darken) either Blowfish or 3DES. Make sure

    your window looks like Figure 3.

  • 7/29/2019 Putty Instruction

    3/14

    - 3 -

    Figure 3: PuTTY Configuration

    7. Look back to the left column and click on Tunnels which is underneath SSH, which we were justworking on.

    8. At the very top of the window, select the checkbox labeled Enable X11 forwarding. Please do notforget to do this very important step! Then the window should match Figure 4.

  • 7/29/2019 Putty Instruction

    4/14

    - 4 -

    Figure 4: PuTTY Configuration

    9. Click back on the Session tab at the very top of the left hand column.10. On the right under Saved Sessions, enter a name for these settings (something like ncsu or ucok ).11. Click the Save button to the right of the text box.12. Select (highlight) the settings you just saved from the list and click the Open button at the bottom of

    the page (Figure 5).

  • 7/29/2019 Putty Instruction

    5/14

    - 5 -

    Figure 5: PuTTY Configuration

    Wow! You have now configured PuTTY. To run PuTTY, make sure that you select your saved settings andclickOpen.

  • 7/29/2019 Putty Instruction

    6/14

    - 6 -

    Login:1. Click on the PuTTY icon. The following screen will pop up.

    Figure 6: PuTTY Log in.

    13. Select the saved session and click on open. The following command window will open.

    Figure 7: PuTTY Command Prompt.

  • 7/29/2019 Putty Instruction

    7/14

    - 7 -

    14. Type the Login ID (Login ID and password for UNIX server account is provided by the instructor)and press enter. Then, enter your password and press enter.

    The password is not visible on the screen. So, please make sure you type the correct password andpress enter.

    You should see the following screen.

    Figure 8: Screen after Login.

    On the green (rectangular shaped as show in above figure), you can simply type the UNIX commands and

    press Enter.

  • 7/29/2019 Putty Instruction

    8/14

    - 8 -

    UNIX COMMANANDS:

    Basic UNIX command:

    UNIX is case sensitive operating system. So, it is very important to follow the case of commandto make it work.

    To use UNIX commands, just type the command on the screen as below.

    cal:Simply type cal then hit ENTER. This command will display the calendar of the current month.

    Figure 9: Displaying Current Calendar

    cd: It stands for change current directory. Without a dirname, itc will return you to your home

    directory. Otherwise, it takes you to the directory named. "cd /" will take you to the root directory.

    Chmod: it Changes the permission of a file. If you type "ls -l" in a directory, you might get

    something like this:drwx------ 3 ertle 512 Jul 16 13:38 LaTeX/

    drwxr-xr-- 2 ertle 512 Jun22 12:26 X/

    drwxr-xr-x 3 ertle 512 Jul 13 16:29 Xroff/

    -rw-r--r-- 1 ertle 373 Oct 3 1992 o.me

    -rw-r--r-- 1 ertle 747 Nov 21 1992 profile

    -rwxr-xr-x 1 ertle 244 Jul 16 23:44 zap*

    The first part of the line tells you the files permissions. For example, the X file permissions start with a d

    denotes it is a directory. The next three characters, rwx show that the owner has read, write, and execute

    permissions on this file.The next three characters, r-x shows that people in the same group have read

    and execute permission on the file. Finally, the last three characters r- shows that everyone else only has

    read permission on that file. You can use chmod to change these permissions.

    cp {filename(s)}{path}

    Copies files from one directory/filename to another. cp f1 f2 makes a file f2 identical to f1. cp *.c

    src/ copies all files that end in .c into the src subdirectory.

  • 7/29/2019 Putty Instruction

    9/14

    - 9 -

    date: shows the current date and time.

    Find: It searches the named directory and its sub-directories for files. Most frequently called like this:

    find ./ -name "t*" -print

    Which searches the current directory (and all of its sub-directories) for any files that begin with the

    letter t and then prints them out. If you are looking for a specific filename, then replace "t*" withfilename, and find will print out all incidences of this file.

    Logout: Exits and disconnects your network connection.

    ls{directory}:Shows directory listing. If no directory is specified, ls prints the names of the

    files in the current directory.

    ls -l{directory}:Shows long directory listing. If you type ls -l in a directory, you might get

    something like this:drwx------ 3 ertle 512 Jul 16 13:38 LaTeX/

    drwxr-xr-- 2 ertle 512 Jun 22 12:26 X/

    drwxr-xr-x 3 ertle 512 Jul 13 16:29 Xroff/

    -rw-r--r-- 1 ertle 373 Oct 3 1992 o.me

    -rw-r--r-- 1 ertle 747 Nov 21 1992 profile

    -rwxr-xr-x 1 ertle 244 Jul 16 23:44 zap*

    The first part of the line tells you the files permissions. For example, the X file permissions start with a dwhich tells that it is a directory. The next three characters, rwx show that the owner has read, write, and

    execute permissions on this file. The next three characters, r-x shows that people in the same group have

    read and execute permission on the file. Finally, the last three characters r- shows that everyone else onlyhas read permission on that file.

    mkdirdirname: Makes a sub-directory named dirname in the current directory.

    man{section}name:Shows the full manual page entry for name. Without a section number, man

    may give you any or all man pages for that name. For example, man write will give you the manual

    pages for the write command, and man 2 write will give you the system call for write.

    Pwd: Shows current working directory path.

    rmfilename(s): Removes files.

    Be careful with this one because it is irreversible.

    rmdirdirname:Removes the directory dirname.

    who: Shows who is currently logged on UNIX server.

  • 7/29/2019 Putty Instruction

    10/14

    - 10 -

    Text editors: VI, NANO:These are the popular text editors available in PuTTY. Among these, VI is the most popular because it does

    indentation and highlights the code automatically. It helps programmer to correct mistakes quickly. NANO

    is simple text editor like Textpad. NANO displays the command on the screen. At the beginner level, it is

    recommended to use NANO, because you do not have to remember commands to use this text editor like VI

    .For vi: vi filename

    For NANO nano filename

    Compiling Commands:

    C file cc -g file.c -o executablename llib

    C++ c++ -g file.cpp -o executablename -llib".

    JAVAjavac filename.java

    FORTRAN f77 filename

    Table 1: Compiling Commands

  • 7/29/2019 Putty Instruction

    11/14

    - 11 -

    Advanced PuTTY User:If you are interested in the advanced feature of PuTTY, you can consult with your instructor or click the

    following website.

    http://www.emba.uvm.edu/CF/adv.php

  • 7/29/2019 Putty Instruction

    12/14

    - 12 -

    Summary of UNIX command:

    cal Displays a calendar.

    cat Concatenates and displays files.

    cc C compiler.

    cd Change directory.chgrp Changes a file's group ownership.

    chmod Changes a file's access permissions.

    chown Changes the individual ownership of a file.

    cmp Compares two files; diplays the location (line and byte) of the

    1st difference between the two files.

    comm Compares two files - finds lines that are common to both.

    cp Copies a file to another location.

    date Returns the date and time.

    df Displays free space in the file system.

    diff Displays the differences between two files or directories.

    du Reports on file system usage.

    echo Displays its argument.

    ed Text editor.

    f77 FORTRAN compiler.

    find Locates the files with specified characteristics.

    grep Searches for a pattern within a file. (also see awk)

    help 1 line blurb.

    kill Ends a process.

    ln Link files.

    lpr Copies the file to the line printer.

    ls Displays information about one or more files.

    mail Used to receive or deliver e-mail.

    man Display manual for the most common unix commands.

    mkdir Creates a new directory.

    more Displays a long file so that the user can scroll through it.

    mv Used to move or rename files.

    netstat Get network status.ps Display a process's status.

    pwd Display the name of the working directory.

    rm Removes one or more files.

    rmdir Deletes one or more directories.

    sleep Causes a process to become inactive for a specified length of time.

    sort Sort and merge one or more files.

    spell Finds spelling errors in a file.

    split Divides a file.

    stty Display or set terminal parameters.

    tail Displays the end of a file.

    tset Sets the terminal type.

    uniq Compares 2 files. Displays lines in one file that are unique.

    vi Full screen editor.

    wc Count words in a file.

    whatis 1 line description of a few of the Unix commands

    who Information on who else is online.

  • 7/29/2019 Putty Instruction

    13/14

    - 13 -

    References:

    PuTTY FAQ < http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html >

    Configuring PuTTY

    TechShop

    UVM College of Mathematics and Engineering < http://www.emba.uvm.edu/CF/adv.php >

    Basic UNIX Commands

    Basic UNIX Commands

  • 7/29/2019 Putty Instruction

    14/14

    - 14 -