Shell Accounts For Newbies By: Ghost_Rider (Ghost_Rider9@hotmail.com) http://blacksun.box.sk This is a tutorial explaining what a shell account is, how you can get one and some basic commands. If you are thinking that you can find here shell scripting or exploit hints, you are wrong. Wait for further tutorials. The first part is just a bunch of questions with answers. After that I'll do a quick view about shell flavours and where can you get shells for free. So here we go. ---------------------------------- The Questions That Everybody Asks ---------------------------------- Q:What is a shell account? A:Ok...I think I won't be needing to explain what an account is, but let's talk about the shell. You probably are using Windows, so your shell is command.com and all that cute (crashing) Graphic environment. Being more precise a shell is the program that translates and sends your commands to your system's core. This happens because the core doesn't understand the commands you give. For example, when you type "cd ..", this command will be first translate to a low language level by the shell and just after that, sent to the core (or your CPU would drive mad). Do you imagine how painful would be using a computer if you hadn't a shell? You needed to use a low language level, like assembler or even worst (binary) to do something. If you wanted to do "cd .." you would have to write a bunch of push mem put mem blabla mem or a huge list of 00101010. Do you really think that this would work with people? I don't think so. Ok..Ok.. There are many persons that code in assembler, but I'm talking about ordinary people. Q:So you are saying that a shell is just a "thing" that translates my inputs to the core, like command.com. But why do I want to connect to a remote command.com, I've got my own in my box. A: People like Shell Accounts because you don't connect to a Windows box, but to a *nix box. If you can't have linux or any other *nix System at home, you could get a Shell Account, and start playing with linux like if it was in your own box. Q:My friend is a *nix guru and he told me that some shells suck because they are restricted what's that? A:There are two kind of shells, the restricted shells and the non-restricted shells. The difference between both is that usually restricted shells aren't rented, they are free shells, but in those shells you can't execute every command you want (for example, using a free shell they can keep you out of dig, nslookup and telnet programs). On the otherhand using non-restricted shells, you can run any command you want but these kind of shells are paid (sometimes universities give non-restricted shells to the students). Hey, but even if you have a restricted shell don't be worried, some of them are really good. Q: So you are saying that I can get a shell without paying for it? A: Yes you can. For me the best place is at nether.net (other host that is a free shell provider is freeshell.org), I'll guide you through the all process later. Sometimes ISPs also give shell accounts to their users, so you may have already a shell account and you don't know, phone to yours ISP's Support and talk with them. Q: I phoned my ISP asking for a shell account, and they asked why did I want one. What should I say? A: Just tell that you really love to surf with Lynx, and that you want to learn Unix. That should do. If they hang up, just go for the free shells. Q: Hey I've got a shell, but how can I know if it's a good shell? A: I think the answer is relative, it depends from the person who answer, for me the things that make a good shell are listed below. -> Telnet (terminal emulator) -> Nslookup (Gives you information about the host) -> FTP (File Transfer Protocol, do I need to say anything else?) -> Finger (gets information about some user) -> Traceroute (The same as tracerT.exe in Windows, but much better) -> Dig (probably many of the restricted shells won't let you use, but don't worry) -> Netstat (like in windows, lists all sockets and their status) -> GCC (c compiler, cool to do your own coding) -> Gzip (to [un]pack stuff) -> Lynx (Best Browser in the World) This doesn't mean that a good shell for you needs to have this. For you a good shell could be just a shell that allows you to telnet, like I said it's very relative. But if your shell account doesn't let you use telnet, FTP and GCC, you should get other shell account. By now you should be getting bored of reading stupid questions, and even more stupid answers, so let's get in another section. Let's talk a little about the flavours of Shell Accounts. ------------------------------------------- Quick View about flavours of Shell Accounts ------------------------------------------- There are may kinds of shell accounts, some of them are what we call home made shells, other are the "standard" shell. Let's talk about the "standard" shells. --------------------------------- Just for your information ------------------------------------- Home made shells are shells that are made by the sysop that owns the system, and it's just running in his system. ------------------------------------------------------------------------------------------------- Like I said there are plenty of shells.You've got: -> shell: Bourne Shell -> Bash : Bourne Again Shell -> Cshell: C Shell -> Tcsh: Technical C Shell -> Ksh: Kourne Shell And many others. (I just listed those because it's the ones you can get at nether.net) Each shell has their strong and weak points. For example the Cshell allows you to type in C commands like if it were normal commands, that means that if you type printf Hello it will be the same as echo in other shells(for the ones who don't know C language, printf stands for printing in the screen the input given). I won't explain the strong and weak points in each shell, you should be the one doing that. Just get them at free shell providers at start exploring. The only hint I'll give you is that Bash is the best shell for beginners, if you want a more powerful shell just go to the C shell. Start with bash, explore the system, learn some bash scripting, then start using other shells. Talk with your friends that have others shells, ask what they think about it, you're getting the idea, aren't you?;) If you already have one shell and doesn't know which shell is it, just type in echo $shell and it will probably be shown your shell's type. Since this is a quick view, I'll end here. Gonna help you getting a real cool shell account. ------------------------------------- Getting a Shell Account At Nether.net ------------------------------------- So are you ready to get your first shell account? Of course you are. The only thing I don't like in nether.net is the offline time that the server sometimes stays. So if you can connect to nether.net don't worry, since there are plenty of people in that host sometimes he overflows and goes offline. Just wait some hours and you probably can go online again. ------ Accessing nether.net ------ Step 1. (Getting your terminal emulator ready to roll) Open your telnet program, you can find it in windows directory under the name telnet.exe Step 2. (Connecting) Now that you are probably looking to the Telnet Window, select the Connect menu, and in that menu select Remote System. It will be shown another box asking you for the hostname, port and term type. Fill those fields with the information below. Hostname: nether.net Port: Telnet (or 23 it's the same) Term Type: vt100 (it should be already in this value) You wait a little and... ------ Getting the account ------ Step 3. (Logging in) Now you should be looking at the nether.net banner. That says: Kernel SunOS 5.6 Generic_105181-17 on a sun4d Welcome to nether.net New to the system? Login as newuser login: Now like they say use newuser as login. A program called newuser will start, helping you creating an account. Step 4. (Customising Keys) After a bunch of crap, the newuser program will ask you to Customise keys. It will be asked the delete key (^H) and the break key (^C). What is in brackets are the default if you want you can choose any other. The ^H stands for the delete key (the one that has the <- symbol on it), and the ^C stands for ctrl+c. Attention don't write ^H or ^C just press the keys, and that will be the output. Step 5. (Selecting Terminal Type) After you customise the keys you'll be asked to enter your terminal type, you can select ? and the program will print you all the terminals support by it, but you should select vt100 or just press enter. Pressing enter the program will assume that your terminal is a dumb terminal. There is no problem to select the dumb terminal because you can change it later. Step 6. (Personal Data) It will be asked things like your full name, phone number, birth date, sex, blablab, your getting the idea. If you want you can just put a . and press enter. You can also give fake information, I think that 98% of the users at nether.net did that. In the end of all the questions you'll be asked if you want to hide the information from other users. Just say yes or no, I suggest you to say yes. Step 7. (Selecting Shell) Now it will be shown a list with the legal shells, just select one, like I said before if you are new to shell accounts choose bash shell. Step 8. (Selecting Login) Just select your login, like always 8 chars is the max length. Step 9. (Selecting Password) Select a password, it will be asked two times to see if the password is correct. You can change the password later using the passwd command later. Step 10. (Accepting Choices) At this time you should be looking to something like: full name: Full Name loginid: your username password: address: your address if you gave any telephone: your phone number if you gave any other e-mail addresses: your e-mail address if you gave any occupation: The same here computers: Same birthdate: Some date sex: Also something here interests: Something how (did you find out about us): How do you find them Privacy switch on/off shell: your shell account terminal: your terminal type erase '^H' kill '^U' interrupt '^C' Type "help" for a list of things you can change. Select thing to change or "done"? Now if you agree with all the data just type done and press enter, or if you want to change something just type the you want to change field. Step 11. (After You type Done) Now the program is checking if there is already your username, you should be seeing a bunch of numbers scrolling, it's normal don't get scared... Now if your Login name already exists will be asked another, if there isn't the system will encrypt your password, and you'll stay for some time watching a bunch of numbers scrolling. After that.... Step 12. (Congratulations You have a shell account) Yep you've got a shell account, now you should be again in the login sequence and your login name is already written just type in the password, press enter and have fun. Remember that you can have many shells has you want. So if you want you can login again with newuser but instead of choosing a bash shell choose a Cshell and all the others or a shell bash again... ------------ The commands ------------ Hi won't talk about of every command that exists in *nix systems, if I did that the file would become huge. If you want to a big amount of information about commands check the final notes section. The basic commands are listed below with their function. Syntax: command [switches] -> description man [command] -> display the manual entry about the [command] you gave. cd [directory] -> like in DOS it changes your current directory, to go one directory up you also use .., if you want to return to your home directory just type cd without the [directory] parameter. ls [-al] -> ls makes the same as dir in DOS, it lists every file in the directory, the -al is some of the switch you can use. Using this two switch the listing will be displayed with hidden files, file permission, group and owner. To know all the other switches man ls. cat [file] -> it's the same as the command type in DOS, it displays the content of the [file] given. logout -> Logs you out from your shell account. who -> Shows who's online, with information about those users. There are programs that make you invisible to the who command, but that's another story, probably in another tutorial. ps [-aux] -> ps shows every procedure that is running, something like ctrl+alt+del in windows (not to reboot, but to show what's running) but much more powerful since it isn't known how we can run a program without being display in ps. If you run ps with no switches it will just show your own processes, if you use the switch -aux it will list every process that is running in the machine. joe [file] -> joe is a text editor, it edits or creates the [file] given. Sometimes the shell providers haven't joe but they should have vi (another text editor). This command should be enough for you to start. Also use man command in the commands that we talk to get a bigger and more detailed description about it. Good surfing! ----------- Final Notes ----------- Now what you need is a little of practice, and good books to get in touch with the commands. One of the best *nix books is UNIX IN A NUTSHELL. You can find it in the books section at BSRF WWW page (http://blacksun.box.sk). For me, this is the best book about the subject, and since it's free I strongly recommend you to get it. Another good thing is man. For example, if you want to get some information about telnet, and how to use it, you just type in: man telnet And it will be prompt the manual page about telnet. If you are using a shell in the freeshell server (freeshell.org) you can also use the command help without any options. This will call you a menu with the options you can call. And keep in mind that *nix is Case Sensitive so Man, man and MaN or .profile and .Profile isn't the same thing. Appendixes ---------- A) Can I run IRC bots on free shell accounts? (by R a v e N) No!! Unless you intend to be logged into your shell 24 hours a day. Free shell providers will kill all of your running processes (running programs in the Windows world) once you log off. B) Are there are other places in which I can get a shell account? (by R a v e N) Of course! Try http://www.cyberarmy.com/lists