To install/configure SSH you should check out one of many guides you can find browsing the internet, this one for example.
You can connect to your viritual machiene via SSH using the following command:
You will thereafter be prompted to enter your password. To be able to connect you need, as said, an IP. When connecting locally you have a local IP. You can check this address for the current system using the
ifconfig command. Example:
eth0 Link encap:Ethernet HWaddr e8:39:35:42:ed:96
inet addr:188.8.131.52 Bcast:184.108.40.206 Mask:255.255.0.0
inet6 addr: fe80::ea39:35ff:fe42:ed96/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:85385 errors:0 dropped:0 overruns:0 frame:0
TX packets:77885 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:48235010 (48.2 MB) TX bytes:9640323 (9.6 MB)
inet addr being your local IP address, in my case
220.127.116.11. If I would connect to my SSH server on my computer I would therefore execute the following:
To allow connecting from outside of your network you are required to forward the incoming traffic, on the port SSH is running on, to your local IP address via a admin panel for your router. Some routers may not support this and the admin panel work differently between manufacturers. You can always call customer support if you are stuck with this issue.
To check your "global" IP address you can visit this website: what's my IP?
When connected to your "server" through SSH you can perform various tasks such as SQL:
mysql -u root -p -h 127.0.0.0
In the above scenario root is the user, password is enabled through
-p and the host is 127.0.0.0/localhost (your local computer).
You can also access files using nano or any other text editor like the very popular and powerful (and complicated)
vim. All in all you now have the power of a terminal in your hands, that is if you connect via PuTTY.
Connecting via, say Ubuntu's file manager, gives you a better visual experience and allow you to edit files in a GUI editor rather than through the command line. Similar programs exist on Windows, you'll have to figure that one out yourself.