Assuming the VPS uses CentOS, then assume a newer version of 6.5.
There may not be a desktop installed on the VPS, but SSH is generally installed, and the firewall is open with 22 ports by default.
Let's start with SSH.
# install SSH, default is installed.
# yum Install SSH
# Start the SSH server side
# service sshd Start
# chkconfig sshd on
SSH Login
If the local side is Linux
# SSH [email protected]
Root is the login user name, 192.168.1.1 is the host's IP address, of course, you can also use the hostname, domain name to refer to the IP address.
# SSH 192.168.1.1
The user name of the current client will be logged in.
SSH Login without password
But every time I enter a password login is very troublesome, there is no way to let the server can determine my identity, no need to enter a password can be directly certified?
In addition to using password Authentication, SSH provides a way to verify public and private keys. The client generates a private key, generates a corresponding public key, and then uploads the public key to the server. Here is the Linux sample.
Generate the private key, public key on the client (note, done on the client):
# ssh-keygen-t RSA
-t specifies the type of key to be created, which is RSA by default, so only execute Ssh-keygen is the same.
You will be prompted to enter the encryption password for your private key. If you need to completely detach the password, you can leave it blank and enter directly, otherwise each connection needs to be unlocked locally.
When finished, two files are generated under the ~/.ssh/path under the current user's home directory Id_rsa and Id_rsa.pub are private and public keys respectively.
Next, to upload the generated public key to the server, the following code is also executed on the client.
# ssh-copy-id-i ~/.ssh/id_rsa.pub [email protected]
Where root can be modified as the server-side user name that you want to log on automatically, 192.168.1.1 modified to your VPS hostname or IP address.
Finally, SSH logs on to the remote server.
# SSH [email protected]
At this point you do not need a password to log in.
How to open SSH remote connection in CentOS