SSH Tips 1: Create a shortcut-Linux Enterprise Application-Linux server application information. For more information, see the following. When managing servers, I usually use SSH. The following are some tips for using SSH.
Create shortcuts
When you log on to the server by executing an ssh Command, are you bored with a long string of parameters after the command? For example, to log on to the example.com host as a user named serveradmin@domain.com, You need to execute:
Ssh serveradmin@domain.com @ example.com
You can certainly use alias, but SSH also provides corresponding solutions-you can create shortcuts for remote hosts that require frequent access.
Check whether there is. ssh in your main directory. If not, use mkdir to create one;
Use your favorite Text Editor (such as Vim) to create the config configuration file:
Vim ~ /. Ssh/config
As described in the previous example, if the shortcut name I want to create is lt, add the following content, where HostName is the host name and User is the User name:
Host lt
HostName example.com
User serveradmin@domain.com
Save and edit.
Now, you only need to execute ssh lt.
Original article: http://linuxtoy.org/archives/ssh-tip-creating-shortcut.html
Author: linuxtoy
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service