1 day 2 logging in, passwords, man, talk, write. 2 logging in unix is a multi user system –many...
DESCRIPTION
3 Telnet Application To connect to a UNIX machine from a MS- Windows machine, you will need a telnet program. –All versions of Windows have a built in program called “telnet”. You can run it by clicking on “Start” – “Run” and type telnet. However, it does not support SSH, and is frequently confused by the terminal emulation. –Putty.exe is another telnet application. We will be using it in this class.TRANSCRIPT
1
Day 2
Logging in,Passwords,
Man, talk, write
2
Logging in• Unix is a multi user system
– Many people can be using it at the same time.– Connections are made through a text connection
• telnet– A simple text based window which allows you to type commands
and see the response.
• ssh– Secure shell. Makes the text typed between you and the UNIX
machine unreadable to anyone on the Internet.
• ftp– Allows you to transfer files from your machine to the UNIX
machine and back again.
3
Telnet Application• To connect to a UNIX machine from a MS-
Windows machine, you will need a telnet program.– All versions of Windows have a built in program
called “telnet”. You can run it by clicking on “Start” – “Run” and type telnet.
• However, it does not support SSH, and is frequently confused by the terminal emulation.
– Putty.exe is another telnet application.• We will be using it in this class.
4
Putty• Putty is a free piece of software.
– Available from the class web site:• http://newcollege.clayton.edu/ITSK1601
– Runs on any version of windows.
5
Logging in• The unix machine we will be using is called
– kahuna.clayton.edu– It does not accept regular “telnet” connections. You
must connect via “SSH”– You will need your username and password.– Username: First part of email address.
• E.g. [email protected] would – log in with csu1111
– Password: Social security number• E.g. 111223333
6
Start Putty
7
Login
8
Logged in
9
Exercise:• Download putty from our class web site:
– http://newcollege.clayton.edu/ITSK1601• Log into kahuna.clayton.edu with your username
and password– When you get done, help your partner.– If you are both done, type the following command:– tetris-bsd
• Learn to play and have fun for a few minutes while we get everyone logged in.
10
Passwords• Passwords help us prove to the machine that we
are who we say we are.– Often a UNIX machine performs an important
function. Its important to know if someone has authorization to do what he/she says to
– Each user should keep their password very secure• If someone knew your password here they could:
– Send email pretending it came from you– Read your email on kahuna– Get to any of your files, possibly steal your homework
11
Good/Bad passwords• You should choose a password which would be
hard for someone to guess.– Bad ideas:
• Social Security number, Phone number, Date of birth, Name, parents names.
• Any word in any language dictionary– Good ideas:
• User CAPITAL letters and numbers as much as possible• User special characters like: []{}-_=+!@#$%^&*()?/><‘:’”• Length is important
12
Examples• Good passwords:
– First letter of each word in a rhyme/sentence• Jajwuahtfapow [Jack and Jill went up a hill to fetch a pail of
water]– A group of words together with numbers substituted
for letters• B4its0Ver [Before it’s over]
• Just be sure you will remember the password later. It sucks to have to go to the sysadmin and ask for your password to be reset.
13
Changing your password• Type the command
– passwd• It will prompt you to enter your OLD password
again, and then your new password twice.
• You should change your password approx every 6 months, and anytime you think it has been compromised.
14
Who is root?• There is one special account on every UNIX
machine:– root
• Anyone logged in as root, has permission to do anything on the system. – They can change passwords, view any file, setup
hardware.• The root password for a system must be kept very
secure.
15
What if you forget your password?• There are no back doors in UNIX.• Nobody can tell you what your password was, not
even the system administrator• The root user can type:
– passwd enda• Since it is root requesting this, they will not be
asked for the old password. So they can set it to some new password.
16
Oops…who do I get out?• If you type any command and don’t know how to
get out try:– Hit q– Hold down the control key and hit c
• One of those will work 99% of the time. For the other 1% try:– Hold down the control key and hit z– Type:
• kill %1– Close the window you have and log in again.
17
Communicating in UNIX• UNIX offers the following:
– Email – Real time messages– Chat sessions
18
E-mail• Sending an email:
– mail [email protected]– You will be prompted for a subject.– Type the message. When you are done, hit enter once
then press the period “.” and then press enter again.
– If you type mail by itself without an email address it will show you what is in your mail box.
19
Pine• The first UNIX application we are going to look
at is called PINE (Program for Internet News and Email)
• This is one of the many UNIX mail programs• Easy to use, has menus at the bottom of the screen
which tells you the options.• ^C would mean “hold down the control key and
hit C”
20
Pine basics• Sending a message
– Enter pine and hit C– Type the message, hit Control X to send.
• Viewing mail– Enter pine and hit L– Use the arrows to highlight “INBOX” click enter.– Select the message you want to see with the arrow
keys and hit enter to view it.– D will mark the message for deletion, when you exit it
will ask if you want them deleted.
21
Exercise:• Send your partner a mail message on kahuna:
– Their address is: • [email protected]
• Each of you should check your mail on Kahuna and verify you got the message.
22
write• You can send someone who is logged in on your
machine a real time message– write enda– Then type what you want to say.– When you are done, hit Control D
23
Exercise• Send your partner a message using write• Remember to hold down the control key and hit D
when you are done.
24
talk• If you want a full chat session, then “talk” is what
your looking for:– talk enda
• This would send me a message indicating that you want to talk to me. If I want to respond, I would answer with:– talk bob
• Now we have a window which I can see what you type, and you can see what I type.
25
Talking to many at once• If you need to talk to 3 or more people at once,
talk cannot do that. – There is a program called “ytalk” which can do that.– ytalk enda– Again, to respond I must answer with “ytalk bob”– You can add additional people with by hitting the
escape key once, and then pressing a• You will be prompted for the other person to add.
26
Feeling Anti-Social?• Just incase you are feeling anti-social, or incase
you are actually trying to get some work done.• You can prevent people from writing to you or
talking to you with:– mesg n
• This can be reversed with:– mesg y
• Each time you log in, you must run this to stop messages.
27
Exercise• Get a talk session going with a few people around
you.– Talk about how wonderful UNIX is.– Be sure to add more than 2 people.
28
Oh man!• What if you don’t know how to use one of these
programs?– Read the online manual.
• man talk• man ytalk• man pine• man write• man man
– Sometimes cryptic, but can give you a hint as to what options are supported, and how to use them.
29
Manual Sections• Sometimes the same command can have 2 or
more meanings:– Write
• As we just saw, this allows you to send a message to someone else who is logged in.
• In many programming languages including C, write means put something on the screen
– To specify that you want the programming language version you would type:
» man 2 write
– This means you want section 2 of the manual.
30
Logging out• To get out of a UNIX system type:
– exit