ssh tunneling

putty

Buttewifi tells us how to do it on Windows via putty.

SSH tunneling allows a remote SSH server to function as a proxy server. Network traffic from your local system can be sent through the secure connection to the SSH server. For example, you could direct your web browsing traffic through an SSH tunnel to encrypt it. This would prevent people on public Wi-Fi networks from seeing what you’re browsing or bypass website and content filters on a local network.

Of course, the traffic becomes unencrypted when it leaves the SSH server and accesses the Internet. To a web server you access through the tunnel, your connection will appear to be coming from the computer running your SSH server, not the local system.

-howtogeek.com

 

terminal

$ ssh -D 9999 -C user@host

ssh compression

compress

tar -zcvf dextraapi_bu20131021.tar.gz public_html
zip -r filename.zip folder_you_want_to_zip

 

uncompress

$tar xf public.tar.gz

ssh directory size

Find folder or directory size

du -sh
du -s

 


show databases

show databases

mysql> show databases

 

use database

mysql> use <databasename>

show tables

mysql> show tables;

create database and user

mysql> create database;

 

create user

GRANT ALL PRIVILEGES ON dbTest.* To 'user'@'hostname' IDENTIFIED BY 'password';

mysql size of tables

Stackoverflow saves the day.


server date & time

date

ssh rename & move directory

rename 

$ mv oldname newname

 

move directory contents to previous directory

$ mv myfolder/* .

mySQL reset root pw

$ /opt/bitnami/mysql/bin/mysqladmin -p -u root password 

update bash

$sudo apt-get install bash