|
1. What are the basic steps in seting up SSH?
2. Why is SSH necessary?
3. Where can I find more info on SSH?
4. Where can I get SSH client software?
5. What is SSH?
6. What are some commands I can use when logged in via SSH?
7. How do I setup SecureCRT?
8. Obtaining SSH access
1. What are the basic steps in seting up SSH? - Top
SSH is now enabled for your account by requesting it from our support dept . You can access the server using the SSH
java based terminal interface supplied within the control panel or obtain your own SSH client, A good free SSH client program is Putty for information on obtaining and using Putty click here.
B. Obtain a SSH client, by downloading and/or purchasing the software.
C. Follow the SSH client side software instructions to generate an RSA key.
D. The server will Install the key for you when you first log into the server using your SSH client if you have generated it and stored it on your hard drive .
2. Why is SSH necessary? - Top
As the internet grows it is more frequently the subject of security breaches. The easiest way to hack a web site is to
setup a sniff program, usually at an ISP and grab the username and password where a user is logging into. This is very
easily done when a client uses telnet because telnet passes all information to the server in clear text. When we allowed
users to access our network with telnet we had at least one hack attempt per day. Successful hack attempts result in
damaged or destroyed sites, stolen information, and FBI investigations.
We now have one of the most secure networks thanks to the cooperation of all shell account users who are abandoning
telnet and accessing their account via Secure Shell (SSH). SSH does not pass any information in clear text but rather uses secure encryption.
3. Where can I find more info on SSH? - Top
http://www.employees.org/~satch/ssh/faq/ 4. Where can I get SSH client software? - Top
We highly recommend SecureCRT available at Van Dyke
If you live outside the US and Canada, you may be able to use F-Secure at Data Fellows
You can find additional SSH clients at http://www.ece.nwu.edu/~mack23/ssh-clients.html
Users looking for a free version or users outside the United States should file through the free implementations at
http://www.net.lut.ac.uk/psst/
There is also the totally free internationally available ttssh:
http://www.zip.com.au/~roca/ttssh.html
5. What is SSH? - Top
Telnet is a terminal program that allows you to work on a machine other than your own. If you use Windows, you might
consider it similar to opening a DOS prompt on our machine, instead using the UNIX operating system once you get on our server.
SSH is a different protocol that works much the same way as Telnet, but it utilizes encryption to ensure that your
password and all data sent and received during your session are kept safe. 6. What are some commands I can use when logged in via SSH?
- Top
ls................. show directory mkdir .............. make a directory
rmdir .............. remove directory (rm -r to delete folders with files) rm ................. remove files cd ................. change current directory
man (command) ...... shows help on a specific command pico (filename) .... easy to use text editor to edit files pine ............... easy to use mailer
more (file) ........ views a file, pausing every screenful telnet (host) ...... connect to another Internet site ftp (host) ......... connects to a FTP site
grep ............... search for a string in a file chmod .............changes permissions on a file gzip ............... best compression for UNIX files
zip ................ zip for IBM files tar ................ combines multiple files into one or vice-versa
cat
Display, combine or append files
cat file1 display file1
cat file1 file2 > file1and2 combines file1 and file2
cat file1 >> file2 append file1 to file2
cd
The command cd my_dir changes your position to the directory specified, in this case my_dir.
The command cd without an argument moves you to your home directory.
cd (change directory)
cd return to the home directory
cd .. move up one directory level
cd ../.. move up two directory levels
cd subdirectory move to subdirectory
cp
The command cpfirst_file copy_file copies the contents of first_file into the file copy_file.
To indicate that the new file is to have the same name as first_file, use a period (.) instead of of providing a name for the second file. (In this
case, the files must be in separate directories, as two files cannot have the same name if they are in the same directory.) For example: cpsome_directory/my_file
. copies my_file, located in some_directory, and creates a file named my_file in the current working directory.
cp (copy)
cp file1 file2 copy file1 to file2
cp file1 subdirectory copy file1 to subdirectory
cp file1 file2 directory copy file1 and file2 to directory
grep
The command grep string filename searches filename for string. It outputs every
line which contains string. The form grep -v string filename outputs every line which does not contain string. The argument string is read by grep as a regular expression as described in the following:
A list of characters enclosed by [ and ] matches any character in the list. A list of characters enclosed by
[ and ] with ^ as the first character matches any character not in the list. A range of characters can be expressed by separating the first and last characters
in the range by a hyphen and enclosing them by [ and ]. A period (.) matches any single character. A regular expression matching a single character (i.e.
not a range) can be followed by a repetition operator:
? indicates that the preceding item is optional, matched once at most.
* indicates that the preceding item will be matched zero or more times.
+ indicates that the preceding item will be matched one or more times.
{n} indicates that the preceding item is matched exactly n times.
{n,} indicates that the preceding item is matched n or more times.
{,m} indicates that the preceding item is optional and is matched m times at most.
{n,m} indicates that the preceding item is matched at least n times, but no more than m times.
ls
The command ls lists the files in the current directory. The form ls -F shows the difference
between directories and ordinary files. The form ls -a lists all files, even those that are normally invisible in UNIX (files whose names start with
a period, i.e. .xstartup).
ls (list) Does a directory listing
ls lists a directory in columns
ls -l gives a fuller listing including file permissions, size, date created
ls -al similar to the above but includes "dot" files
ls –ald as above but includes primary user
mv
The command mv file_name dir_name moves the file file_name from the current directory
into the directory dir_name, where dir_name is a subdirectory of the current directory. The form mv old_file new_file renames old_file and calls it new_file.
mv (move). Moves or renames one or more files
mv file1 newname renames file1
mv directory newname renames directory
mv directory existing-directory moves directory to a subdirectory of target
mv file1 file2 directory move files to directory
pwd
The command pwd prints the pathname of the current, or working, directory.
whois
The command whois lookup_string performs a directory lookup on persons at your home institution, where lookup_string
is all or part of someone's first name, last name, or phone number.
Click here for more on whois.
UNIX COMMANDS SHORTCUTS
^ c
INTERRUPT program ([Del] in System V).
^ d
END text input (also logoff).
^ h
BACKSPACE.
^ r
REPEAT last line typed (or !!).
^ q
Unlock terminal screen.
^ s
Stop the screen from scrolling.
^ u
UNDO last line typed.
^ w
Delete last WORD typed.
^ z
SUSPEND a running program
The VI Editor
This is an introduction to vi, a text editor that is available on almost all Unix machines. This is what
you use to create a file or to change the contents of a file. This is only an introduction.
To start up vi, use the command 'vi filename',
where filename is the name of the file that you want to change. If you want to create a new file, you can just say 'vi newfilename',
where newfilename is the name that you want to give the file.
If you get mail or something else messes up the screen, you can press [ESC]
and then ^l (control-L) to redraw the screen. This will not affect your file, only your display.
The tricky part about vi is that it has two modes, insert mode and command mode. When you are in insert mode,
all you can do is type text, which will go directly into the file wherever your cursor is. When you are in command mode, you can do everything else,
including moving the cursor, searching, and setting options.
To move from insert mode to command mode, use the [ESC]
key. If you forget to do this and end up with a ':wq' or something else that you don't want at the end of your line, just backspace
over the characters that you don't want, then hit [ESC]. If you hit [ESC] when you are already in command
mode, the terminal will beep at you, but it won't do anything to your file. When in doubt, hit [ESC].
To move from command mode to insert mode, use the i, a, o, or O command as described below. There are a few others,
but those are the most common.
To use the following commands, you must be in command mode:
Cursor Movement:
A handy thing about these commands is that you can type a number first, and the editor will do the command that
many times. For instance, h moves the cursor one character to the left, and 12h moves the cursor twelve characters to the left. You shouldn't see the
number or command that you type, by the way. If you do, you are in insert mode; you should backspace over the number and press the [ESC] key, then try again.
h - moves cursor one character to the left
j - moves cursor one line down
k - moves cursor one line up
l - moves cursor one character to the right
^f - moves cursor one screen forward
^d - moves cursor a half screen down
^b - moves cursor one screen backward
^u - moves cursor a half screen up
^ - moves cursor to the beginning of the line
$ - moves cursor to the end of a line
w - moves cursor one word forward, with punctuation and braces as new words
W - moves cursor forward to the next word
b - moves cursor one word backward, with punctuation and braces as new words
B - moves cursor backward to the next word
/pattern - searches for pattern and moves the cursor there
?pattern - searches backwards for pattern and moves the cursor there
Deleting Text:
x - deletes the character the cursor is on
X - deletes the character to the left of the cursor
dd - deletes the entire line the cursor is on
d followed by a cursor movement command deletes that much text. For instance, w moves the cursor forward a
word, and dw deletes to the end of the word. The 5h command moves the cursor five characters to the left, and the d5h command deletes five characters to the left.
These commands may seem a little confusing at first. The i command means that everything you type until you
hit [ESC] will be inserted to the left of the cursor. In other words, this command leaves you in insert mode with the insertion point to the left of
where the cursor was when you hit 'i.'
Inserting Text:
i - inserts text to the left of the cursor (leaves you in insert mode)
a - appends text to the right of the cursor (leaves you in insert mode)
A - appends text at the end of the line (leaves you in insert mode)
o - opens new line under the line the cursor is on (leaves you in insert mode)
O - opens new line above the line the cursor is on (leaves you in insert mode)
How Do I Get Out Of This Thing, Anyway?
When you hit the colon (:), you will see it at the bottom of the screen (unless you are still in insert mode,
in which case you should back up over it and press [ESC], then try again). You will see anything you type after the colon at the bottom of the screen.
After commands that use a colon, you have to hit the key.
:q! - exits without saving changes
:w - write changes
&nbs
|