How to login to your shell account:
PinoyShells support a secure telnet protocol called SSH (Secure Shell protocol). This works in basically the same way as telnet, but everything is encrypted for better security. If your shell supports SSH, it's a good idea to use that instead of regular telnet. However, you need a client that supports SSH, such as PuTTY or SecureCRT
When your shell account is activated, you should receive information which includes the hostname of the shell, and hostname of the FTP server (although the FTP server often has the same hostname as the shell). The first thing you'll want to do is telnet to the shell. Load up your telnet or SSH client, and enter the address of the shell (e.g. server.pinoyshells.com). You will be prompted for your username/password. After that, a motd will usually be displayed, and then you'll be staring at something that looks (and works) very similarly to a command prompt.
Shell Commands
First up, you need to familiarise yourself with a few shell commands. Listed below are some of the commands you'll need to know to perform basic operations on the shell.
cd <directory> - Changes to the specified directory, similar to DOS's cd command. To switch to the directory above the current one, specify two periods as the directory, i.e. cd ... Typing cd ~ will return you to your home directory (the tilde is shorthand for the path your home directory, e.g. /home2/user/cooldude).
gunzip <file> - Extracts the contents of a gz file (which are similar to zip files), e.g. gunzip nice.tcl.gz.
kill -9 <pid> - Kills the process with the specified pid number. You can get the pid number of a process by using the ps x command described below. This command is useful for killing your Eggdrop if you're unable to shut it down by other means.
ls - This is very similar to the DOS dir command. It lists the contents of the current directory. For a more detailed listing, type ls -al.
mv <oldfile> <newfile> - Renames a file or directory. You can also move a file with this command. For example, mv chatty.tcl scripts/chatty.tcl with move chatty.tcl to the scripts directory (relative to the current directory).
passwd - Allows you to change your shell account password (it will prompt for your old password, then ask you to enter a new one).
pico -w <file> - Opens the specified file in the pico text editor. The -w option prevents Tcl scripts from being messed up due to line wrapping.
ps x - Shows all current 'processes' you have running on the shell. This includes things such as Eggdrop, IRC bouncers, and open telnet and FTP sessions. This command is useful for getting the pid (process ID) number of a process. To view the resource usage of your processes, type ps ux.
pwd - Shows the current working directory path, e.g. /home2/user/cooldude/mybot.
quota - Shows how much disk space is allocated to you, and how much you're using.
rm <file> - Deletes a file. To delete a directory and all its contents (including subdirectories), use rm -rf <directory>.
tar -xf <file> - Used to extract a tar file. To extract a tar.gz or .tgz file, use tar -zxf <file> (if that doesn't work, use gunzip <file> then tar -xf <file>).
The above commands are basically all you need to know in order to setup and run an Eggdrop. You may wish to learn some more commands as you become more experienced using the shell. Some other useful and interesting commands are shown below.
netstat - Displays all connections going to and from the server.
ps aux - Displays all processes running on the system and their resource usage.
top - Displays details about system resource usage.
uptime - Displays the current uptime and server load.
Using FTP on the Shell:
One of the most common uses for shell accounts is to download files from a server to the shell via FTP (note that this is different from transferring files between your machine and the shell via FTP). To do this, you connect to your shell account via telnet or SSH, and use the shell's FTP client. This works similarly to downloading files to your computer, but instead the file downloads to your space on the shell, and you can later download the file from the shell to your computer if needed. A fast shell is capable of downloading files at a much faster rate than a typical dial-up connection.
To download a file, type ftp at the shell prompt. You will then be greeted with the ftp prompt. Below is a list of the basic commands you need to use at the ftp prompt to download a file to your shell (shown in the order one would typically use them).
open <server> - Connects to the specified FTP server. If the connection is successful, you'll be prompted to enter a login name and password (for most servers, type anonymous as login, and user@domain.com as your password).
ls - Lists the contents of the current directory on the FTP server.
cd <directory> - Changes to the specified directory on the FTP server. To switch to the directory above the current one, specify two periods as the directory, i.e. cd ...
bin - Switches to binary mode. You need to use this command before you download any files.
hash - Enables the display of hash marks while downloading a file. Useful for monitoring download progress.
prompt - Disables prompting between gets if getting multiple files using mget (below).
get <file> - Downloads the specified file to your shell.
mget <file1 file2 fileN> - Downloads all specified files, one after the other. This command supports wildcards, e.g. mget egg* will download all files in the current directory on the FTP server with names starting with 'egg'.
close - Disconnects from the FTP server.
quit - Quits you from the ftp program.
Setting up a Psybnc:
wget http://www.psychoid.lam3rz.de/psyBNC2.3.1.tar.gz;tar zxvf psyBNC2.3.1.tar.gz;cd psybnc;make - type this to download the source and compile the psybnc.
pico psybnc.conf - edit the port.
Congrats, your setup is complete. If you haven't done so already, it's time to compile your bnc by typing "make" at the shell prompt in your psybnc directory. Then type "./psybnc" to start the bouncer. Hopefully everything went smoothly and you're ready to jump into the next section.
Setting Up Your Account
The first thing you need to do is connect to your bnc. In your irc client, open up the connect dialogue box and add in another server. Name it My BNC or something like that, enter the IP and port, and enter the password that you chose (either through menuconfig or in the conf file). Now make sure that your ident is set to your username. It's also a good idea to set your e-mail address to username@whatever.com. If psy can't get an ident response from you, it checks your e-mail addy as verification of the username. If everything goes well, you'll see this when you connect:
-Welcome- psyBNC2.3.1
Now you need to get connected to irc: first, you need to select your vhost. To see what vhosts are available, at your shell prompt type:
vhosts
This command is only available if your shell provider has created such a function, but in my experience 99% have. For security reasons (?), there is no way to view the vhosts in psy. After your vhost is selected, you'll need to add in some irc servers, and set a few other options. the commands follow below. All commands appear like this /mycommand, everything else after it is an explanation. All brackets are for my purposes, don't use brackets in any command!
/bvhost [vhost] -- (this command used to be /vhost) -- [vhost] is your vhost in alpha form (ie, this.is.a.cool.vhost.com and not 127.0.0.1)
/addserver [server] :[port] -- server can be in alpha or numeric form...
Once you add in the server, psy will auto-connect to it in a short while. You can add in more servers so that if one goes down, psy can reconnect to a different one. Just use the command above again. For server managment:
/listservers -- lists all the servers you have added
/delserver [n] -- deletes the server with #[n] (as shown by the listservers command)
/jump -- disconnects you from your current server and attempts to connect to the next server in your list
/bquit -- disconnects you from the server until you force it to connect
/bconnect -- connects you to irc
Now, remember that psy will keep you connected to irc even when you're not connected to the bnc. So, these commands are helpful:
/setaway [message] -- psy will display this message to all channels you're on when you quit the bnc. It will NOT repeat this message (since that's gay). To remove the message, just type /setaway
/setawaynick [nick] -- when you quit the bnc, psy will auto-change your nick to the nick you set here. When you reconnect, it'll auto change it back to what's shown in the mirc nick.
OK, now for some more commands that ppl find useful. Remember that ALL commands are in the README file that came with psybnc. I'm not going to repeat all of them.
/playprivatelog -- plays the log of all messages sent to you when you were disconnected from the bnc. The log will be opened in a window called -psyBNC.
/eraseprivatelog -- erases the aforementioned log.
psy has a damn cool feature in that it allows encryption. You can encrypt text sent to a channel or a person. Each person needs to have the same key to view the text. This is helpful if you're paranoid, or if you want to have a private conversation in a public channel
|