How do I login via ssh to my account?

SSH is secure shell that gives you command prompt access on the linux server. You need an SSH client software on your computer to login to the server. Here is one free client available called Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/ Here is the direct link to download for Windows PC (95, 98, ME, NT, 2000, XP and Vista) : http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe Just download this program and save it anywhere on your computer. Double click on putty.exe to run it. It will ask you for Host Name (or IP address) which is your account domain name or server IP or server machine name, you can use any. Click Open. It will alert you for the host key if it is the first time and not cached, you can continue by pressing Yes. It will then ask you for your username, login as: this is your cpanel/ftp username. And then it will prompt you for your password which is the password for that cpanel/ftp username. You are now logged into your account on shell command line. Please go through other FAQ’s in SSH section to learn about various commands you can...

How can I backup a directory or my website via SSH?

To backup complete site files, login via ssh. While in you are in main dir type: tar -zcf site_backup.tar.gz public_html This will create a file named site_backup.tar.gz in your main dir. To restore this file as a site type: gunzip site_backup.tar.gz hit enter, then type: tar -xvf site_backup.tar hit enter and your all done. If you need to archive your emails stored in your account, you can do the same with “mail” folder. This does not include MySQL database backup if you use one. Please refer to MySQL section on how to do the...

What are some basic commands that are available via SSH?

ln (redirecting file access) Type ln -s fred.html index.html to redirect all file accesses from index.html to the file fred.html. passwd (changing your password) Type passwd to change your password. You may also use Brain to change your password. zip/unzip Type zip to zip files and unzip to unzip files. This program is compatible with the zip program for DOS. For example: zip myzip file1 file2 file3 This puts the files file1, file2, and file3 into a new zip archive called myzip.zip. On the other hand, if you had the archive myzip.zip and wanted to get back the files: unzip myzip Typing zip or unzip by itself will give you a usage summary, showing nearly all the options availible. du (disk usage) The Unix command du -s directory shows how much disk space is used by a directory and everything below it. While we work on creating the complicated command needed to automatically check all the directories you are associated with, you can find out how much space is in use by the WWW files for a domain with du -s /home/domain/www If you don’t have anything much in your home directory or mail spool, this comes close to the total space you have in use. (You would know if you did have other things in your home directory, and could use du -s $HOME to check on that.) locate (find files) The normal Unix methods of locating files have one thing in common, they are slower than molasses on a winter night in Alaska. So instead, we use a powerful program called locate. Type locate file_name and the...

How can I manipulate a directory in shell?

There are far more commands than these but here are a few to get your started: In order to keep track of the possibly millions of files on-line, Unix systems have a directory tree, which enables meaningful classification of files. For example, the most essential system programs are kept in /bin/, user home directories are all under /home/, and everything having to do with the WWW is under /www/. More specifically, your home directory is /home/you/ and the directory for your WWW files is /home/you/www/. pwd pwd This prints out your working directory: where you are. When you give a filename to a command without specifying some other directory, the filename is looked up, manipulated, or created in your current working directory. mkdir mkdir flintstones This makes a subdirectory of the current directory named flintstones. cd cd flintstones This changes the directory to the subdirectory named flintstones. cd /home/domain/www/flintstones This changes the directory to the home directory of the flintstones. cd /home/flintstones/www This changes the directory to the WWW directory of the flintstones. cd With no arguments, cd returns you to your home directory. rmdir rmdir flintstones This removes the subdirectory flintstones. The directory must be empty for this to...

How can I check my disk space usage in SSH?

From the Unix prompt, typing the following: du -s /home/youruser This will give you a report back of the number of kilobytes (k) all files in your www directory add up to. You can also use -h switch like this to see human readable number in size: du -sh /home/youruser If you want to see the size of each folder under the current directory: du -ah –max-depth=1 For example to check the usage of each folder in public_html: cd ~/public_html du -ah...

What is scp / sftp?

Scp and sftp are both part of OpenSSH, the secure shell server we run. Do note that you cannot use sftp with an FTP only user – despite the name, sftp has fairly little in common with FTP. In other words, you must enable shell access for a user before you can use sftp (or scp) with that...