2016年11月13日

How to use SSH and SCP

I heard from Lab. member. He said that I don't know how to use SSH and SCP in command line.
Therefore I would like to explain how to use SSH and SCP.

SSH is achieve "secure connection" on the internet.
For example, you can connect linux server using such as TeraTerm.
Probably you are already using ssh!!

For instance, if you want to connect another server using ssh, you should type as the following,
$ ssh username@server.name
if your username is hogehoge, and server.name is example.com, you can login using folowing command
$ ssh hogehoge@example.com
Then we can use public key cryptography, example.com ask you passphrase in order to login.
Another we could not register public key to example.com, we can login using the our password.

We can create public key and private key pair easily following command.
$ ssh-keygen
After type this command, you should decide and type the passphrase.
You must choose your passphrase cafelly. this phrase must be long.
Long phrase is better than short it.
We can choose combination of favorite words, name, and so on.
Then, in order to carry out the passhrase authentication, we should put public key(*.pub) on the ~/.ssh directory of examle.com's your account, also your ~/.ssh directory must have authorized_keys file which contains your public key information.
Then we should copy public key safely. First choice is we copy the public key from your machine to example.com not using network, for example copy the public key via USB memory etc..
As another issue, we can use the scp command described as following,
$ scp ~/.ssh/id_rsa.pub hogehoge@example.com:./.ssh/id_rsa.pub
In this time, in order to achieve authentication, we type the your example.com's login password.
Scp command is similar to cp command.
$ scp local-file-name username@server.name:remote-file-name

After copy the public key, we should login one time to register from public key to authorized_keys
$ ssh hoge@example.com
$ cd .ssh
$ cat < id_rsa.pub >> authorized_keys
$ chmod 600 authorized_keys
$ logout

at this time you can use passphrase authentication.

Try it!!
posted by evakichi at 23:39| Comment(0) | Programming practice in English

Let's prepare for installing linux on Windows

If your PC has only the Microsoft Windows, you should install linux on the Windows.

In order to install linux, first, you can get virtual machine(VM). There are some VM software for Windows. These are described as the following,
1.VMware,
2.VirtualBox, and so on.

I am using VMware, therefore, I write how to install VMware.

You can get VMware Workstation Player for free!! but you cannot use this for business.
https://my.vmware.com/jp/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0

May be you can install VMware Workstation Player easily. Because you only click the "Next" button!!

I am unkind?
If you have troubles about installation, please let me know using comment column.
I want to know what you cannot understand about this installation.
posted by evakichi at 08:24| Comment(0) | Programming practice in English

Programming practice in English

Hello World!!

From now, I would like to describe how to write programs and how to use *NIX(linux) some times per week.

Goal is as followings.
1.Getting skills about program writing for programming beginner.
2.Getting skill about English more for me!!

Thank you!!
posted by evakichi at 07:42| Comment(0) | Programming practice in English