Setup SSH connection to Stablehost

76 Likes Comment
SSH Connection on Stablehost

Just follow these steps to setup a SSH connection to your servers on
1. Purchase a SSH Access ( $2.5 lifetime ) via url:
2. Install a SSH client ( putty , SecureCRT , Bitvise Tunnelier ).
3. Generate a SSH key via Stabehost Cpanel.
SSH Connection on Stablehost
4. Connect to your shared server / VPS:
IP: your shared IP / dedicated IP
Port: 22
User: cpanel username / Password: cpanel password
5. Some useful commands in SSH:
#create a directory
mkdir folder-name
# download a file from remoted server
scp -P22 [email protected]:/path-to-file-folder/filename.ext .
# backup all mysql databases in separated files
#! /bin/bash
TIMESTAMP=$(date +"%F")

mkdir -p "$BACKUP_DIR/mysql"

databases=`$MYSQL --user=$MYSQL_USER -p$MYSQL_PASSWORD -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema|performance_schema)"`

for db in $databases; do
$MYSQLDUMP --force --opt --user=$MYSQL_USER -p$MYSQL_PASSWORD --databases $db | gzip > "$BACKUP_DIR/mysql/$db.gz"

You might like

About the Author: Toc Xoan

Leave a Reply

Your email address will not be published. Required fields are marked *