代码改变世界

Learning Experience of Big Data: Deploying Tomcat 8.0 and connect ssh without password

2018-07-12 19:22  ovols  阅读(194)  评论(0编辑  收藏  举报

  This mission seems to be easier--we can just decompression Tomcat to our virtural machine and deploy ssh to login without password.Login ssh without password is very critical,although distributed Systems can also run without it.But,as we know,distributed system are based on many servers,isn't it inconvenient for you if every time you try to connect the server's ssh you should enter your password?So,that's the importance of it.

  First of all, we should download Tomcat to our system(As I have said before,download the file whose suffix name is .tar.gz):

Also,we should decompression the file :

 

Succeed

Next,we should start our Tomcat to observe it can use or not.The starting program of Tomcat is in the folder named bin,whose name is startup.sh

now we execute the starting program:

It can be seen on the screen that Tomcat started successfully,now we will start the browser to prove it,definitely,we will unable to access the website:192.168.109.151:8080(your ip + :8080).Why,this is because of the firewall.We must to stop the firewall:

You can connect to the website again and yiou will find we can browse it.

  The second step is to download ssh:there are two programs we should download ---openssh.client and openssh.server,we can just use the instruction "yum" to download it rather than DIY:

 

After this step,we'll try if you can try to connect your own system by the instruction:

You'll find you should enter your password even if you try to connect your own system!It's so inconvenient for us to enter it!

Then we will change it's authorization file to accomplish login it without password:

Then we just press "enter" to the end

Next we should find a file named file .ssh,which is hidden.We should enter this file and we'll find three text,the thing we should do is to change the name of the text named id_isa.pub into authorized_keys

Then we can try to use our system to connect our own system again,you 'll find you can connect to your system without password!