Connect Windows and Linux and Linux and Linux using VNC and SSH

Reference link: Mofan VNC connection tutorial

Remote control using VNC

Linux side (Server side)

Install x11vnc software, which is equivalent to the server side of VNC

sudo apt-get install x11vnc

Set the password when connecting to VNC-server:

x11vnc -storepasswd

Open VNC-server and use the password to establish a connection

x11vnc -usepw

Windows side (Client side)

We want to install a VNC client software, you can download TightVNC, the official website connection: http://www.tightvnc.com/download.php
After downloading, start the TightVNC Viewer in TightVNC
write picture description here

Enter the IP address of the device you want to connect to. To view the IP address of the device in your Ubuntu system, you can use the command:

ifconfig -a

write picture description here
After that, you will be asked to enter a password to connect:
write picture description here
enter the password to connect

Linux side (Client side)

Search for vnc to see, enter the IP address and password of the server to log in
write picture description here

Use SSH to transfer files to each other

Linux (server end)

You need to install the open source SSH tool OpenSSH. Use the following command to install it. Don't worry about it after installation.

udo apt-get install openssh-server

Windows side (Client side)

Download WinSCP: https://winscp.net/eng/download.php
The installation process is simple. Hostname : IP address of Ubuntu system; default port number ; Username : username of Ubuntu system; Password : password of Ubuntu system Open after
installation , you need to enter the following information:
write picture description here
You can click the "Save" option to save the connection information Save it, you don't need to enter the information again when you log in next time.
After clicking login:
write picture description here
enter the password to see the connection interface, which can be dragged and uploaded
write picture description here

Linux side (client side)

Reference address: http://www.jb51.net/article/82608.htm
scp is secure copy, which is used for remote file copying. Data transmission uses ssh, and uses the same authentication method as ssh, providing the same security guarantee

scp [参数] <源地址(用户名@IP地址或主机名)>:<文件路径> <目的地址(用户名@IP地址或主机名)>:<文件路径>

#复制文件
# 将本地的1.txt复制到192.168.3.33主机的/home/yuanduan/目录下
scp /home/bendi/1.txt yuanduan@192.168.3.33:/home/yuanduan/

# 将192.168.3.33主机的/home/yuanduan/目录下2.txt复制到本地的/home/bendi/
scp yuanduan@192.168.3.33:/home/yuanduan/2.txt /home/bendi/

#---------------------------------------------------------------------
# 复制文件夹
# 将本地的111文件夹复制到192.168.3.33主机的/home/yuanduan/目录下
scp -r /home/bendi/111 yuanduan@192.168.3.33:/home/yuanduan/
# 加上-v参数可以显示详情
scp -r -v /home/bendi/111 yuanduan@192.168.3.33:/home/yuanduan/

Remote control using SSH

Linux→Linux

Use the following command to control the remote Linux terminal:

ssh 用户名@ip地址 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325371611&siteId=291194637