Putty, Logging into Kahuna Passwords,man,talk,write

advertisement
Day 2
Logging in,
Passwords,
Man, talk, write
1
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.
2
Telnet Application
• To connect to a UNIX machine from a MSWindows 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.
3
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.
4
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. csu1111@mail.clayton.edu would
– log in with csu1111
– Password: Social security number
• E.g. 111223333
5
Start Putty
6
Login
7
Logged in
8
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.
9
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
10
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
11
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.
12
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.
13
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.
14
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.
15
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.
16
Communicating in UNIX
• UNIX offers the following:
– Email
– Real time messages
– Chat sessions
17
E-mail
• Sending an email:
– mail enda@kahuna.clayton.edu
– 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.
18
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”
19
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.
20
Exercise:
• Send your partner a mail message on kahuna:
– Their address is:
• ccsuxxxxx@kahuna.clayton.edu
• Each of you should check your mail on Kahuna
and verify you got the message.
21
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
22
Exercise
• Send your partner a message using write
• Remember to hold down the control key and hit D
when you are done.
23
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.
24
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.
25
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.
26
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.
27
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.
28
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.
29
Logging out
• To get out of a UNIX system type:
– exit
30
Download