Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and basic Operation of ssh under Ubuntu14.04

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "Ubuntu 14.04 ssh installation and basic operation", in daily operation, I believe many people in Ubuntu 14.04 ssh installation and basic operation problems have doubts, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "Ubuntu 14.04 ssh installation and basic operation" doubts helpful! Next, please follow the small series to learn together!

client installation

SSH is usually a remote secure login

If you do not need to configure the ssh service, just download and install the corresponding client.

sudo apt-get install openssh-client

After successful installation, type ssh on the terminal,

If there are various options prompt, it means that the installation is successful

service configuration

If you need to configure the corresponding service, it is not difficult

sudo apt-get install openssh-server

Generally, the service will be automatically started (and so will the boot later).

To test it, let's try the instructions.

ps -e | grep sshd

The corresponding process information indicates that the ssh service starts normally

profile

Generally speaking, the default port of ssh service is 22, which can be verified by instructions:

sudo netstat -ntlp | grep ssh

if you nee this service port, you can modify that/etc/ssh/sshd_config file

vim /etc/ssh/sshd_config

Change Port 22 to Port XXX (any port number you want, but to verify whether the port is occupied, you can use the netstat command)

After modification, you may encounter a situation that cannot be saved, because there will be various permission problems on linux, so just change the permissions of the file.

sudo chmod 777 /etc/ssh/sshd_config

Then you can save it. For security reasons, you have to change the permissions back after saving it.

sudo chmod 644 /etc/ssh/sshd_config

Finally, restart the service.

sudo service ssh restart or sudo /etc/init.d/ssh can be restarted

login authentication

The next step is to log in and type instructions directly on the terminal.

ssh username@ip (username is your username, ip is your host ip)

Then enter the password.

You can experience it on your own host first, just set the ip to 127.0.0.1

You can also log in remotely, just change the ip to the ip of the remote host.

Instructions for uploading files or copying files remotely:

scp

Copy local files to remote: scp filename username@ip:path

Copy files back locally from remote: scp username@ip:filename Local path

If it is a directory operation, just add the-r option

At this point, on the "Ubuntu 14.04 ssh installation and basic operation" of the end of the study, I hope to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report