To access and log onto a Unix system, will need:
Using Secure SHell Clients
An ssh-2 or later client running on your local system is required to
logon to the VT ARC and many other Unix systems.
Use of telnet is discouraged as it transmits passwords and other communications in clear text.
Using SSH from another Unix System
MAC OS-X, Linux, and most other UNIX systems
have a built in ssh client - simply enter the following command to log
onto the VT ARC system "Inferno2":
ssh my_acct@inferno2.cc.vt.edu
where "my_acct" is your account name on Inferno2.
Notes:
- The VT ARC systems require use of an ssh-2 or later client; when using some
Unix implementations, you will be required to use "ssh2" instead of "ssh" above.
- Inclusion of the account name is not required when the account names on the client and host
machines are the same. For example, if
the account you are using on your local system is the same as your account name on Inferno2, you could
simply enter:
ssh inferno2.cc.vt.edu
After you have connected to the Unix host,
you will be prompted to enter your logon password.
Note: Unix is case sensitive. You must enter your password
in the correct case -- see Unix System Password Information.
Note: Take your time entering the password; with some ssh clients,
you will not be able to use the backspace or delete key to correct a typing mistake.
Using SSH from an MS Windows System
If you are using an MS Windows (2000, XP, 2003, or Vista) Desktop,
you can download the latest "SSHSecureShell" Client (currently
SSHSecureShellClient-3.2.9.exe) from
http://ftp.ssh.com/pub/ssh/ or the
putty ssh client from
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
Installing & Configuring the Windows SSHSecureShell Client
After you download the software, run the SSHSecureShellClient installation
program (exe) and respond to the on-screen prompts.
When the installation is complete, you should have two new icons on your desktop:
| SshClient | Secure Shell Client - used in place of Telnet |
| SSH Secure File Transfer | Secure Shell File Transfer - used in place of FTP (File Transfer Protocol) |
To configure and use the SshClient program, double click on
its desktop icon. When you press the Enter key, a "Connect to Remote
Host" Dialog box will appear. The first time you use the client, the
two fields in this dialog box will be empty; enter the full "Host name"
(e.g., inferno2.cc.vt.edu for VT ARC system "Inferno2") and your
"User name" (account name or user id) in the two fields on this screen; leave Port Number
set at 22 and Authentication Method set as "Password".
Click on the "Connect" button. The first time you connect to a
new machine, the "Host Identification" dialog box will appear informing
you that you had not previously connected to this machine and asking if
you would like to save a host key in the local database of your machine.
Click on "Yes" to continue. You will then be prompted to enter your
password; do so and click on the "OK" button. You will then be
connected to the host you have selected.
To verify that the backspace key is functioning properly, type some
text on the command line and then press the backspace key to see if it
functions as desired. If not, from the Edit menu, select "Settings",
and then select "Keyboard"; the keyboard settings dialog box will then
appear. Select both "Backspace sends delete" and "Delete sends
Backspace" in this dialog and then click on "OK". Again test the
function of the backspace key. If still does not function as expected,
try selecting only "Backspace sends delete" or "Delete sends Backspace"
and then testing if the backspace key is functioning as desired. Once
the backspace key is working properly, you can save your settings by
selecting "Save as" from the file menu and saving as an ssh2 profile; if
you are only using ssh to access one computer, you can save the settings
as "default.ssh2", if you are using multiple machines, you may wish to
save the settings for each machine as a separate profile and place a
shortcut to each profile on your desktop or in the start menu.
To configure and use the SSH Secure File Transfer Client
program, double click on its desktop icon. When you press the Enter
key, a "Connect to Remote Host" Dialog box will appear. The first time
you use the client, the two fields in this dialog box may be empty; if so,
enter the full hostname (e.g., inferno2.cc.vt.edu) and your userid in
the corresponding two fields on this screen; leave Port Number set at 22
and Authentication Method set as "Password". Click on the "Connect"
button. You will then be prompted to enter your password; do so and
click on the "OK" button. You will then be connected to the host you
have selected. A window consisting of two panes will be displayed: the
leftmost pane contains the current directory of the local machine,
the rightmost pane contains a list of the directories on the host machine
(e.g., Inferno2). You can then use the icons within these panes to
navigate up or down each directory tree.
Notes:
- To upload files, simply select them from left pane (e.g., your desktop) and drag
them to the appropriate folder in the right pane (e.g., Inferno2)
of the SSH Secure File Transfer Window. Downloading files is accomplished by selecting
files in the right pane and dragging to the left pane.
Alternatively, you can upload a file (or files) to the currently selected folder of the
Unix system by first selecting the
upload (up pointing arrow) menu icon of the SSH Secure File Transfer Window's Toolbar.
An "Upload" dialog window will then appear displaying files on your local
machine; select the file or files you wish to upload and then click on
the "Upload" button. To download files by selecting the "Download" (down pointing arrow) menu icon.
- By default, "auto-select" transfer mode of the SSH Secure File Transfer Client
is used to determine the best mode for uploading and downloading files based on the file extension.
If the auto-select mode does not function appropriately for your files,
you can specify the transfer mode to by used by selecting the "File Transfer Mode" option from
the "Operation" menu -- ASCII is appropriate for text files and BINARY is appropriate for
images, PDFs, and other binary files.
Logging Onto Unix
After your userid and password have been verified, the
message of the day (motd)
will typically be displayed:
*******************************************************************
* *
* *
* sample message of the day *
* *
* *
*******************************************************************
The shell prompt ("$" is the default prompt for the Bourne, Korn Shell or BASH shells,
"%" is the default C shell prompt)
will be displayed and you may then enter Unix commands.
Logging Out From Unix
To log out of the system enter the command "exit" or press the
Ctrl-D key sequence.
You will then be returned to your prior working environment.
Note: Some userids are customized to prevent accidental logoff using
the <Ctrl-D> key sequence. If <Ctrl-D> does not logoff your session, try
entering the command "exit" or "logout".
Note: If you are using a Unix workstation to access another Unix system, do not turn off the
local workstation unless you are the system administrator for the local machine
and follow the appropriate "shutdown" procedure.
Using the Keyboard
Unix operating systems are case sensitive!
Some keyboard characters have special meaning in the Unix environment;
see Unix Special Characters for some of the
most commonly used special characters.
Press the <Return> key (sometimes this key is labeled as "Enter" or with a large left pointing arrow)
to execute Unix and user-written commands.
Whenever <Return> appears in this section, press the key corresponding to this function.
For example, to list the non-hidden files in the current directory:
ls <Return>
The cat (conCATenate) command can be used to create
or display the contents of files as well as to join files together. Use
the following sequence of commands to create a file:
cat > my_first_file <Return>
Here is a line of text. <Return>
Here is a second line of text. <Return>
Ctrl-D
To display the contents of the file just created, enter:
cat my_first_file <Return>
For the remainder of this guide, use of the <Return> key to
execute Unix and user-written commands
will be assumed and not included as part of the command syntax
in the example exercises.
Control (Ctrl) Key Sequences
Ctrl key sequences are executed immediately and
need not be followed by an <Return> to take effect.
Unix uses key sequences to execute commands such as deleting a character,
terminating an executing command, and logging off. Some of the most
important key sequences include (the first key sequence listed for each
function is the default for many Unix systems):
- <Ctrl-H>
-
<backspace>
- <Del>
-
Erase previous character:
For example, suppose you made a mistake and typed "lx" instead of "ls"
and discovered you mistake prior to pressing the <Return> key. To
backspace over the last character, you could press the <Ctrl-H> key
sequence, that is, press the Ctrl (or Control key on some keyboards) and
while it is depressed, press the h key:
lx<Ctrl-H>s
Note: the stty command can be used to reassign the backspace function to another key; see
Changing System Default Key Definitions.
- <Ctrl-U>
- <@>
- Delete (kill) the current line:
For example, if the full line was entered incorrectly, it can be
deleted in its entirety by using the <Ctrl-U> key sequence:
lx<Ctrl-U>
- <Ctrl-C>
- <Del>
- Interrupt (intr) current command:
This character is used to "interrupt" or "abort" many Unix
commands.
For example, suppose you had issued the man
(display manual pages) command and decided to
cancel it before it has finished executing:
man man
<Ctrl-C>
Do not use <Ctrl-Z> to interrupt a command
you wish to terminate; this control sequence is used
suspend the current active process, but does not kill nor cleanup
temporary files created by the process.
- <Ctrl-D>
- end-of-file
The end-of-file character has many uses. These include:
- Terminating programs
- You may exit
many Unix commands and programs
with this character.
- Terminating text entry
- For example, to end the text of a note
that you are typing with the cat command, enter <Ctrl-D>.
- Logging out
- Press <Ctrl-D> at the Unix prompt
to log out of the system in the traditional manner.
Note: Where more than one "key" is listed for a command,
different Unix systems
may use one or more keys to perform the indicated function. You need
to be aware of the alternative keys for each function should you log
onto another Unix system which does not use the set with which you are
familiar.
Customizing Your Environment
Many commands are available to allow you to customize or modify the
Unix environment according to your preferences.
You may issue such commands after you are logged in to accomplish
the changes you desire or place them in a customization file.
Changing System Default Key Definitions
The stty command can be used both to display the current key
definitions and to change them.
To display the current values of keyboard command sequences, enter:
stty -a
On some systems, the -a option is not recognized. On these
systems, try using the "all" option:
stty all
You can also use the stty command to change the key sequence designated
to perform a selected command. For example, to assign "@" as
the "kill line" character, enter:
stty kill @
You would now press the <@> key instead of <Ctrl-U> to delete the
current line.
If <backspace> does not already function to delete the preceding
character, you can enable it to do so by entering:
stty erase <backspace>
where <backspace> is the key to which you wish to assign the backspace
function.
Note:
On some systems, you will receive an error message
if you attempt to use the stty command to reassign a function to the
key which currently performs a function.
Defining the Terminal Type
If you are using the BASH, Bourne, or Korn shells (a "$"
appears as the default command prompt), you can use the following pair
of commands to assign "vt100" to the TERM environmental variable:
TERM=vt100
export TERM
Do not include spaces on either side of the equal sign.
The variable name TERM is entered in all upper case.
If you are using
the C shell (a "%" appears as the default command prompt), use the following command to
assign vt100 to the TERM environmental variable:
setenv TERM vt100
Userid Customization Files
You can also customize your environment by placing desired
configuration commands in the file which is loaded
by the command processor when you login.
When using the BASH shell, environmental configurations are typically stored in the files .bashrc and .bash_profile.
Commands placed in these files will be executed the next time you log on; commands in .bashrc will be
executed whenever a new BASH shell is started.
If you are using either the Bourne or Korn Shell as your
command processor, you would add these commands to the file
".profile".
The next time you log in, ".profile" will be executed automatically, and
the changes you have made will take effect.
If you are using the C shell (% as the default
prompt) include your customization
commands in ".login" or ".cshrc" file.
The ".login" file is invoked once when you log onto the system and
typically contains stty, setenv, and umask commands.
The ".cshrc" file is invoked each time a new C Shell process is started
and typically contains history, set, and alias commands.
Using the X Windows System
In order to use X applications on a Unix system, you need to be
running an X Windows System server on your local
machine and allow X clients to display back to it.
Most Unix systems include an X Windows System server as part of their installed software and it may already be started
as part of your systems GUI window manager when you log on.
On OS-X systems, the X WIndows System server is not included as
part of the default installation; if you wish to display X clients back to an OS-X system, you must first
install the X-11 software and start your ssh connections from within an X-11 window.
Otherwise, if your system does not start an X Windows System server when it boots up, consult with your System Administrator or the system
documentation for information on how to initialize it.
Once you have initialized the X Windows System server on your local machine, use SSH to log onto the
X Window System client machine, for example, to log onto Dante, you could use the command:
ssh my_acct@dante.cc.vt.edu
When an X client is initiated on Unix system, e.g., dante above, the client output will then
appear in a window on your local display.
You can use the X client "xclock" to test if you have properly configured the connection between your
X Windows Server and the host system:
- On Sun systems (e.g., Dante and Styx), use:
/usr/openwin/bin/xclock
- On SGI systems (e.g., Inferno, Inferno2, or Cauldron), use:
/usr/X11/bin/xclock
Notes:
When you are finished with an X application, you can typically close the application by
selecting "Quit" or "Exit" from the applications main window menu;
otherwise, you can close the displayed X windows
by using the mouse to select the
close box or select the close window option from the appropriate menu.
|