putty Easy Tutorial

And xshell compared, putty in addition to the need for authentication each time you log in, the experience is basically all the same, because the putty to the command line mode of operation, hence will be slightly higher xshell on efficiency.

 

 

1. Download

Download the latest version :( 1)

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

 

 

Download 2 :( tutorials same paragraph)

Baidu Cloud Download:

Version: 0.71

Links: https://pan.baidu.com/s/1maubeW7ZD-3_Tt5Z4_SlKA extraction code: x4ra

 

 

2, the installation & configuration

Double-click the installation, the default installation directory is: C: \ Program Files \ PuTTY \, shell program for the

 

The putty installation directories to the Path environment variable, during file transfer, need to use pscp.exe.

Open cmd test:

Pictured help documentation pscp command.

At this point, the end of the installation & configuration.

 

 

3, the connection

 Entrance:

(1) address of the target host;

(2) the name of the session, to customize, to facilitate the next use;

(3) open a saved session;

(4) save the session to facilitate the next use;

For the session needs multiple use, before connecting, we can save it first, to facilitate the next use.

Click Open, to open the session:

The first time you connect you will be prompted whether to trust the host, select the "Yes" button.

At this point, shell connection is successful.

 

 

4, transfer files

Transfer files, and its implementation depends on the pscp.exe command is executed in the execution pscp cmd command line window instead of putty shell in accordance with the behavior divided into two acts upload and download, both the default mode silent coverage.

 

4.1, upload

 Format:

/*
* -pw:指定密码,如果省略,则上传时需要手动输入密码
* -r:递归拷贝目录,即拷贝目录及其子文件
*/
pscp -pw <password> -r <source_dir> <username>@<ip>:<target_dir>

 

示例:

pscp -pw 123456 -r C:\Users\haku2\Downloads\temp\* [email protected]:/opt/temp

 

 

4.2、下载

命令格式:

/*
* -pw:指定密码,如果省略,则下载时需要手动输入密码
* -r:递归拷贝目录,即拷贝目录及其子文件
*/
pscp -pw <password> -r <username>@<ip>:<target_dir> <source_dir>

 

示例:

pscp -pw 123456 -r [email protected]:/opt/temp/* C:\Users\haku2\Downloads\temp

 

 

5、使用技巧

5.1、建立同步目录

相比于xftp提供的可视化窗口操作,pscp的命令行方式会显得有些笨拙,在上传/下载不同文件时,需要频繁修改命令。

为了避免上述缺点,可以建立同步目录,在传输文件前,将目标文件拷贝到同步目录中,则可使用同一命令实现文件的传输。

 

Guess you like

Origin www.cnblogs.com/kagome2014/p/11085418.html