[CS-FSLUG] Another chapter in my transition to Linux saga

Josiah Ritchie jritchie at bible.edu
Fri Apr 22 09:19:17 CDT 2005


On Thu, 2005-04-21 at 16:31 -0600, Ruth Marlene Friesen wrote:
> Ah, Josiah,
> I've got more questions for you!
> >
> > > > Mutt and SSH give you similar flexibilty as long as you can SSH into
> > > > the machine. I carry a USB stick with PuTTY on it for that kind of
> > > > access. I use it at work frequently also.
> > >
> > > Okay, this is still strange territory for me. I'm going to have to study
> > > up on it, as I can sneak the time to do so.  Thanks, for the
> > > recommendation.
> >
> > It isn't too complicated. I'm sure many on the list can help out. SSH is
> > much like a remote terminal. Many people try to stay away from that so
> > it may not fit if this is true of you.
> >
> I was just trying out something named SSH last night to upload pages to my 
> site, and I had to back out as I couldn't figure out how to use it. Can you 
> give me a 101 lesson in a paragraph or two?

A common newbie misconception is not recognizing that you need to
specify what username you are logging in as, unlike telnet. The common
connection syntax looks like 'ssh josiah at server'. It will then ask for a
password and you are in as long as you have access. For me to log into
my server it's 'ssh myadminuser at ritchietribe.net'. Some hosters provide
ssh by request only or not at all.

> The FTP programs that come with Mandrake 9.1 are gFTP Kftp, and Lftp.
> I tried the first one a few weeks ago, and the next day, checking on something 
> on my site I discovered that all the pages I had uploaded the night before 
> had their permissions changed, and neither I or visitors could get in to see 
> them! I had to use the File Manager on the hosting server to fix that as I 
> could not find anyway to control permissions in gFTP.

With ssh you can reset permissions like you would from the linux
commandline using the chmod command. 'chmod o+rwx file' would give
everyone read, write and execute permissions. 'chmod ugo-x file' would
remove execute permission from user, group and others. You may see this
done with numbers like 'chmod 755 file'. Basically, 4 = read, 2 = write,
1 = execute. The first number is the user permission, the second is
group and the third is others. So, 755 means the user has all
permissions (4+2+1=7) and the other two have read and execute (4+1=5).
Those two permission conventions (especially the numerical one) are good
foundational learning.

Also, become familiar with a commandline (CLI) text editor. nano is
great if your hosting company has it on their server. Remeber to always
use the '-w' switch. It keeps it from wrapping lines which can break
things in code like CSS and Java. If nano isn't available, you may want
to stick to editing on your own desktop and transferring or using the
website's control panel. There are other comparable ones, but I don't
know them off the top of my head. 'vi' and 'emacs' are great editors but
may not be worth taking the time to learn them. Code hackers love them
though for their flexibility.

To get around the CLI, you'll need:

'ls'      (list files in current directory)
'ls -l'   (list with permissions and other attributes)
'pwd'	  (what directory am I in? or present working dir)
'cd dir'  (change directory)
'cd ..'	  (.. is a shortcut for going back 1 directory in the tree)
'cd ~'	  (~ is a shortcut that takes you back to your home dir)
'rm file' (remove file)
'mv file newfile (move or *rename* a file)
'less'	  (this is a pager. Pipe othe commands into it like 
           this 'cmd |less' to scroll through output -- see next para.)

Also critical is the 'man' command. Use it like 'man ls'. This will give
you short manual page with information on usage of the command. Use
'space' to scroll down a page at a time or 'enter' for a line. The arrow
keys also work. 'less' also uses this convention. to exit type 'q'.
Search with '/stuff' where stuff is the string you are looking for.

That's pretty much everything that got me stuck when I started messing
with this, I think. Anyone know any other basic commands that I missed?

> Kget seems strange. I get a message asking if I want to integrate it with 
> Konqueror and then nothing after I say yes. Or where do I look for it in 
> Konqueror?  I did learn that one can use Konqueror for ftp, but when I try to 
> connect to my sites, I get a message telling me that they are private, not 
> anonymous sites. (Which I know, thanks:) 
>
> So last night I tried Lftp and up comes a console type window - and I had to 
> close it as I'm clueless as to how to use that. Got to find documentation 
> first, I guess.
> 
> It has taken me two days to figure out how to download Firefox and give it the 
> right install commands. But it doesn't show up anywhere to open yet. Do I 
> need to reboot first?

NO! The only thing you 'have' to reboot for in Linux is a new kernel and
I've seen some who can avoid that though it is torturous.

> See? Give me a cm and I'll take a meter of answers from you! :)

My CLI snobbery :-) keeps me from using tools like kget. I tend to push
anyone away from the GUI, though you may like to stay there (and that's
fine). Others can help with that. 'wget' is a simple downloader on the
commandline. 'wget http://your.url/here' is the syntax. It then pulls it
down with a pretty progress meter. sftp is a secure implementation of
ftp over ssh. You'll need to start it with a command like 'sftp
admin at ritchietribe.net'. It will then allow you to 'put' and 'get'
files. This is a bit complicated and might be worth avoiding. I prefer
scp (secure copy) which is less flexible, but also a secure way to
transfer files between 2 machines with ssh. the syntax is 'scp
source.file ruth at remotemachine:/dir/to/place/file/in/'. Using wildcards
you can send all files in one directory onto another machine. That would
look like this 'scp /source/dir/*.html
ruth at remotemachine:/dir/to/place/file/in/'.

Someone else may be able to help with the GUI stuff.

JSR/




More information about the Christiansource mailing list