putty笔记

参考官网文献:https://the.earth.li/~sgtatham/putty/0.70/htmldoc/

一、PAGEANT.exe

  简单来说Pageant是SSH身份验证代理。它会将已经解码的私钥保存在内存中,因此PuTTY无需输入密码就能登录。

二、PUTTYGEN.exe

  PuTTYgen是一个生成私钥工具。它生成PuTTY,PSCP和Plink一起使用的公钥和私钥对。 PuTTYgen能生成RSA,DSA,ECDSA和Ed25519密钥。 

  • Key fingerprint:公钥
  • key comment:注解
  • Key passphrase:密码,也就是ssh登录密码
  • Confirm passphrase:确认密码
  • Save private key:将私钥保存到磁盘
  • Save public key:将公钥保存到磁盘

 三、PLINK.exe

  PLINK主要用于自动化操作。

Usage: plink [options] [user@]host [command] 

 四、PSCP.exe

  实现windows和linux之间,文件的上传下载。


//从服务器下载文件到本地 pscp root@服务器ip:资源路径  本地保存路径
//将文件上传到服务器   pscp 本地文件路径 root@服务器ip:上传文件保存路径
Usage: pscp [options] [user@]host:source target
       pscp [options] source [source...] [user@]host:target
       pscp [options] -ls [user@]host:filespec
Options:
  -V        print version information and exit
  -pgpfp    print PGP key fingerprints and exit
  -p        preserve file attributes
  -q        quiet, don't show statistics
  -r        copy directories recursively
  -v        show verbose messages
  -load sessname  Load settings from saved session
  -P port   connect to specified port
  -l user   connect with specified username
  -pw passw login with specified password
  -1 -2     force use of particular SSH protocol version
  -4 -6     force use of IPv4 or IPv6
  -C        enable compression
  -i key    private key file for user authentication
  -noagent  disable use of Pageant
  -agent    enable use of Pageant
  -hostkey aa:bb:cc:... manually specify a host key
  -batch    disable all interactive prompts
  -proxycmd command use 'command' as local proxy
  -unsafe   allow server-side wildcards (DANGEROUS)
  -sftp     force use of SFTP protocol
  -scp      force use of SCP protocol
  -sshlog file
  -sshrawlog file log protocol details to a file

五、PSFTP.exe

  PSFTP是PuTTY SFTP客户端,是一种使用SSH连接在计算机之间安全传输文件的工具。

  PSFTP与PSCP不同:

  • PSCP几乎可以在每个SSH服务器上运行。 PSFTP使用新的SFTP协议,这是SSH-2的一个特性。
  • PSFTP允许您运行交互式文件传输会话,就像Windows ftp程序一样。可以列出目录的内容,浏览文件系统,发出多个get和put命令,并最终注销。相比之下,PSCP旨在执行单个文件传输操作。

  psftp命令远程到服务器:

  

  或者

   

psftp命令如下:

!      run a local command
bye    finish your SFTP session
cd     change your remote working directory
chmod  change file permissions and modes
close  finish your SFTP session but do not quit PSFTP
del    delete files on the remote server
dir    list remote files
exit   finish your SFTP session
get    download a file from the server to your local machine//从远程服务器下载文件到本地,默认直接下载到当前文件目录 
help   give help
lcd    change local working directory
lpwd   print local working directory
ls     list remote files//查看远程服务器文件列表,当前目录下的
mget   download multiple files at once//一次下载多个文件到本地
mkdir  create directories on the remote server
mput   upload multiple files at once//一次上传多个文件到服务器
mv     move or rename file(s) on the remote server
open   connect to a host
put    upload a file from your local machine to the server//将本地文件上传到服务器,默认上传到当前远程文件目录
pwd    print your remote working directory
quit   finish your SFTP session
reget  continue downloading files //继续下载
ren    move or rename file(s) on the remote server
reput  continue uploading files  //继续上传
rm     delete files on the remote server
rmdir  remove directories on the remote server

 例1:默认下载到当前目录

例2:下载到指定目录,先使用lcd切换本地目录

六、PUTTY.exe

 1、登录,双击运行,host Name输入ip,其他默认,open。

2、退出,官方推荐使用 logout命令退出。

3、Seesion中的配置:

  • “seesion”配置面板包含需要指定的基本选项,点击“save”可保存session方便以后重新打开。
  • logging配置会话的日志,默认情况下是None,不保存日志。

4、Terminal的配置

  • "Auto wrap mode initially on" :自动换行模式,默认勾选。
  • "DEC Origin Mode initially on" :控制光标位置。
  • "Implicit CR in every LF" :控制光标位置。
  • "Implicit LF in every CR" :控制光标位置。
  • Use background colour to erase screen” :清屏时,控制终端的背景颜色。
  • “Enable blinking text” :允许文字闪烁。
 
原文地址:https://www.cnblogs.com/yanketao/p/9622807.html