SSH/VNC remote server connection

Source: Internet
Author: User

I. Ssh text interface remote connection 650) This. width = 650; "src ="/e/u261/themes/default/images/spacer.gif "alt =" sshdconfiguration file DETAILS .txt "class =" editor-attachment "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "/>

1. Remote Service Classification

Text interface plaintext: Telnet, RSH, and so on, which is rarely used currently.

Text interface ciphertext: SSH-based, relatively secure data encryption during transmission.

Graphical interfaces: XDMCP, VNC, RDP, and other common interfaces.

2. SSH (Secure Shell Protocol)

Provides SSH remote management and sftp servers. Both use port 22.

3. Encryption Method

Asymmetric Key systems: they include public and private keys, public key encryption (publishing), and Private Key decryption (saving the local machine ).

A. Each time the server starts the SSH service, the service will take the initiative to find the file of/etc/ssh/ssh_host, when the new system starts SSH for the first time, it will automatically create the required public key file and calculate the desired private key.

B. Client Requests

C. The server sends its own public key file to the client

D. The client record compares the server's public key and randomly calculates its own public key

E. The client transmits its own public key to the server

F. Two-way transmission of encrypted data

4. Start SSH

[[Email protected] ~] # Service sshd start // restart and stop)

[[Email protected] ~] #/Etc/init. d/sshd start

5. stfp

[[Email protected] ~] # SFTP [email protected] // log on to the remote host using SFTP

SFTP> ls // query files in the current path of the remote host

SFTP> lls // query files in the current path of the local host

Note: l must be added to the commands used for local behaviors, that is, l in lower case.

SFTP> put local directory or file remote host directory // Upload File

SFTP> get remote host file original directory // download file

6. SCP

[[Email protected] ~] # SCP [-Pr] [-l rate] File [Account @] HOST: directory name // upload local file

[[Email protected] ~] # SCP [-Pr] [-l rate] [account @] HOST: file directory name // download local files

Options and parameters:
-P: retain the permission data of the original file;
-R: when the source is a directory, you can copy the entire directory (including subdirectories)
-L: the transmission speed can be limited, in kbits/s. For example, [-l 800] indicates the transmission speed limit of 100 Kbytes/s.

Example:

[[Email protected]/] # SCP-r/CC [email protected]:/root // copy the local CC directory to the remote host/root directory.

[[Email protected] ~] # SCP-l 800/root/dd_1file [email protected]: // upload the local dd_1file file to the root directory 10.1.1.3 with a speed limit of 100 Kbytes/s

7. You can set the SSH permission in/etc/ssh/sshd_config: A. Set the SSH version number. We recommend that you use V2. B. Cancel the root logon permission.



Ii. VNC (Virtual Network Computing)

1. The VNC server starts a user-required port on the server. The port number range is 5901 ~ 5910. The VNC Server provides a single client connection.

2. Command Format

Server:

[[Email protected] ~] # Vncserver [: number] [-Geometry Resolution] [Options]

[[Email protected] ~] # Vncserver [-kill: Number]

Options and parameters:

: Number: the port on which the VNC Server is opened. If it is: 1, it indicates VNC 5901.

Port

-Geometry: resolution, such as 1024x768 or 800x600.

Options: Other X-related options, such as-query localhost

-Kill: Delete the started VNC port! Identity control.

[[Email protected] ~] # Yum install tigervnc-server // server software

[[Email protected] ~] # Vncserver: 3 // start port 5903 and create a connection password. Minimum Password: Six
[[Email protected] ~] # Netstat-tulnp | grep x // check whether the port is enabled
[[Email protected] ~] # Vncpasswd // change the password
Note: Set firewall rules to disable the firewall or enable the port to be connected to the VNC Server Client.

Client:

[[Email protected] ~] # Yum install tigervnc // client software

[[Email protected] ~] # Vncviewer 192.168.10.254: 3 // connect to the remote VNC server. Specify the connection port and enter the VNC connection password set on the server to log on.

Note: When setting the VNC online password on the server, you must start the VNC user. You must also use this user to start the VNC connection when logging on to the VNC client.

Windows client can use: RealVNC Login

: Http://www.realvnc.com/download.html


This article from "life is also a practice" blog, please be sure to keep this source http://wgmml.blog.51cto.com/3050917/1615859

SSH/VNC remote server connection

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.