SSH trong Ubuntu (English)


SSH (Secure Shell) allows you to connect to another computer. When you SSH into a Ubuntu box, it is almost the same as if you were to sit in front of that computer’s terminal. SSH also supports file transfers so it is useful if you want to connect to, say, a LAMP server remotely.

Installation

First, install the OpenSSH server. During this time, you may want to record the server’s IP address or host name.

sudo apt-get install openssh-server

Second, you’re done.

Connecting

From Linux or Mac OS X

Linux and Mac OS X includes SSH functionality via the Terminal. Simply fire up Terminal in Applications > Accessories for Ubuntu or /Applications/Utilities/ for OS X and enter the following

ssh -l login_name ip_address

For example:

ssh -l lijamez 192.168.1.123

You should then be prompted for your password that is associated with your account on the Ubuntu box.

From Windows

You will need to download PuTTY. Once downloaded, open it up and enter the IP address or host name into the Host Name field. Then connect and your login name will be prompted.

File Transfers

You can use scp to transfer files to and fro.

scp /home/user/file.txt login_name@ip_address:/home/user2/

An example:

scp /home/james/file.txt lijamez@192.168.1.123:/home/lijamez/

Alternatively, you may use a dedicated application if you need to transfer many files.

For Linux, you can use gFTP or your desktop environment’s file browser.

For Mac, there is Cyberduck.

For Windows, there is WinSCP.

For all of them, there is FileZilla.

Disable

To disable the OpenSSH service, go to System > Administration > Services. Find “Remote shell server (ssh)” and uncheck it.

References: Techotopia

Advertisements
By dbglory Posted in Linux Tagged

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s