May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

SSH terminal login in linux

Windows VPS remotely manage the SSH login tool is PuTTY , but Linux, there is no need to use it. Linux, Unix (including Mac iOS) are bound to have a built-in command-line terminal, built OpenSSH commands. VPS Linux system through which to log on to be more convenient.

Open a command line terminal in Linux, the direct input instruction,

 

ssh <username>@<serverdomain or IP> -p <port>

Under normal circumstances, where ? indicates the current users of the system root directory, so this document may be /home/username/.ssh/config (system depends on the use of a).

Now enter the configuration, such as the above command used example, a user named username, VPS server server_IP, SSH service port on the server is 22, then,

 
cat >> ~/.ssh/config <<EOF
Host your_alias
    User username
    Hostname server_IP
    Port 22
EOF


Here your_alias can be any aliases you want, such as server.  Now you can simply type,
ssh your_alias 


This configuration can also be combined with something else to features such as connection remains.  We do not want to make it in time to send a meaningless data operations to keep the connection will not be disconnected server automatically at regular intervals 
cat "ServerAliveInterval 30" >> ~/.ssh/config


 

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>