I don't get "shell access"
I've been FTP'ing for years but I never really learned - or understand the concepts of "Shell Access", "Telnet" or "SSH". In general, what's the deal and how do I do it?
I often install scripts that say 'if you have shell access, do this', but since I don't even know how to do it, I always end up doing the painfully slow unzip and FTP method.
1) How do I know if I have "shell access"?
2) What program should I use? I downloaded something called PuTTy but I don't know what the heck is going on with it or how to use it.
2) After I upload a "Tarball" via FTP, how do I use a Telnet type program like PuTTy to make the magic happen?
These questions could apply to any script but incase it helps, I'm looking at these directions: [url]http://cvs.sourceforge.net/viewcvs.py/*checkout*/gallery/gallery2/README.html?rev=1.116#installing[/url]
Greg K posted this at 23:15 — 25th July 2005.
He has: 2,145 posts
Joined: Nov 2003
Shell Access is like using the DOS prompt on windows. The program PuTTy will do the job of getting you access, and is needed for SSH access (SSH is Secure Shell access and it encrypted.) I use PuTTy for secure connections, but for general use, I prefer a program called CRT.
some common commands once connected:
ls -la (like DIR in dos, display directory listing, long format, all files, do ls -la | more to make it pause every 24 lines (that is a pipe symbol, not a L or 1)
cd (lke CD in dos, change directory)
mkdir (like MD in dos, creates a new directory.
man (like HELP in older DOS, display the MANual page for a command, do man {command}, ie man tar to see all the options for tar.
Mainly for tar, you do something like the example on the link you gave: tar xzf filenametar is the program, x (the first letter) is the command (create, list, extract), z is an option that tells it that the file is compressed using gzip, so it will automaticaly unzip it first. the f tells it that you are giving it a filename, it should always be the last option before the name of the file.
Some info to think about to help understand this. This is how I know it, and I could be wrong about some of it. Back in the days, data was archives on lonarge reels of tapes (think of old geeky movies showing those spinnging to indicate someone hacked in like weird science). Well hense the name of the program tape archive. The purpose was take the files and pack them all together in one group for reading and saving on tape. Well as drive space was more and more abundant, it was more used to do this with a file on your computer (the f option). Now this only grouped the files (and their attributes like persmissions, timestamps, relative paths, etc) so you didn't have to specify every file and every path.
However this did not save you any space. Those of us in the DOS/Windows land are used to things like WinZip do this, but also compress the files too to make it take up less space. Well on unix / linux systems, you have gzip that actually compresses them. So you add the z option, it packages all the files together, then conpresses that huge (.tar) file, hense the format filename.tar.gz. Yes, winzip make this seem easier.
Speaking of winzip, if you open up a filename.tar.gz with winzip, it will let you know there is a second archive once it opens the first one. (it first acts upon the .tar.gz, extractings the .tar file, then you can extract the files in the .tar file.
Anyhow, to find out if you have shell access, ask your hosting company. Also, open up PuTTy, and try connecting to the server you FTP files to. If you get a prompt asking you for login, try the info you use for FTP.
One thing to note, hard to get used to at first. Backspace and some other keys do not work like you are used to in windows.
Good luck, let me know if you have any other questions about shell, i will try to help.
-Greg
fifeclub posted this at 14:34 — 26th July 2005.
He has: 688 posts
Joined: Feb 2001
Great info, thanks. I've found out that I need to be given shell access first so I'm waiting on that. In the mean time, is a Telnet program the same as a SSH program? Are these terms (and "shell") all synonyms?
Thanks again for the great info to help me get started on understanding this stuff.
ttst posted this at 18:25 — 26th July 2005.
They have: 5 posts
Joined: Jul 2005
The best program for SSH is "Putty". Google it.
Greg K posted this at 20:13 — 26th July 2005.
He has: 2,145 posts
Joined: Nov 2003
telnet and ssh are pretty much (as i know) the same, just one is a secure connection, the other isn't.
Programs that will do SSH will usually also do regular telnet as well.
-Greg
JeevesBond posted this at 22:11 — 26th July 2005.
He has: 3,956 posts
Joined: Jun 2002
Filled a hole in my knowledge there as well Greg... Thanks
Greg K posted this at 00:12 — 27th July 2005.
He has: 2,145 posts
Joined: Nov 2003
For the most part FTP is plenty, but there are times when having shell access is nice.
One popular command that I forgot, which is one I use a lot myself, is pico filename. It is a basic text editor that I prefer. The most used commands are listed at the bottom of the screen (use CTRL-key to activate them).
[post note: Yes I know there are several popular text editors, some way more functional, as I said this is just the one I prefer for simple edits, so no need to start a "which one is better war ]
The nice part is, telnet is on all windows systems, and if needed PuTTY is a standalone program (doesn't require an install, just download the .exe and run), so you can make quick changes from any computer.
Another big thing I use shell access for is setting up password files for a password protected directory set up via .htaccess. Use htpasswd filename username to add the username to the password file specified. It will then prompt you for the passwords. (note, one system I maintain has Apache 2 on it, and you have to use htpasswd2.) If you are creating a new password file, use htpasswd -c filename username.
As I think of other things I find shell really useful, I'll post them here.
-Greg
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.