WinSCP is an open source tool for Windows that allows files to be safely copied between local and remote computers (SFTP and FTP). Installing WinSCP is a simple process. It begins with visiting the WinSCP site, clicking the Download link at the top of the page, and doing what comes naturally. Accepting default options during installation should suit most users' needs. Anyone generally familiar with both GUI FTP clients and SSH tools should be able to manage basic functionality of WinSCP using password authentication; the use of the login screen is fairly self-evident.

Using public key authentication with WinSCP is a bit less obvious. In fact, it cannot be done with WinSCP alone: it requires the use of an external tool, such as the PuTTYgen application, to generate a keypair that WinSCP will use to negotiate authentication with the SSH server. "Installing" PuTTYgen is even easier than doing so with WinSCP, however. It consists solely of opening the PuTTY site in a browser, clicking the Download link at the top of the page, and clicking the puttygen.exe link to download the file. Instead of an installer, this download will be the program. When finished downloading, running the program is just a double-click away.

Opening PuTTYgen presents a key generation dialog. It should be set to a default of SSH-2 RSA for the type of key to be generated, using a 1024 bit key. Check with system administrators or policy makers, if applicable, to find out whether there are key type and size requirements before generating a key. When a key type and size has been selected, click the Generate button.

A progress bar will appear at the top of the dialog, with the words, "Please generate some randomness by moving the mouse over the blank area." The space just below the progress bar is the "blank area" indicated, and the progress bar will move as the user moves the mouse cursor in that area enough to contribute some randomness for the key generation process to use.

When that step is finished, a public key will be shown at the top of the dialog, and blank fields for choosing a passphrase for a private key. If the user loses the selected passphrase — which must be entered into both of the passphrase fields so the key generator will have some kind of confirmation that a key was not entered incorrectly — access to the private key will be lost as well, rendering that keypair useless. To fix that problem, this entire process will have to be undertaken again, including the placement of the public key on the target server (described below). A password manager, such as Password Safe, can help out here.

The public key text shown at the top of the key generator dialog is labeled "Public key for pasting into OpenSSH authorized_keys file:", and describes in general what must be done with it. The remote server to which the user needs access should have a ~/.ssh directory within the home directory of the user account that will be used for server login, and if that directory does not yet exist, it may need to be created. Within that directory, there may be an authorized_keys file; if not, it too should be created. The entirety of the public key text provided in the key generator dialog should be copied into that authorized_keys file as a single line (not counting editor linewrap).

Finally, after copying the public key text where it needs to be and entering a private key passphrase (twice), both the Save public key and Save private key buttons should be clicked. The public key can be saved under any filename and in any location at all. Its purpose, as suggested by the term "public key", is to be publicly shared. The private key, however, will come with a special .ppk filename extension, and should be protected from accidental sharing with others. Once someone else has a copy of a private key, the usefulness of the keypair for ensuring the user's privacy has been compromised.

When this is all done, the user can create and save a public key authenticated session configuration in WinSCP. From the WinSCP Login dialog, the user should enter the correct information for the Host name: and User name: fields, and set the correct port number if the default SSH port (number 22) is not used. Instead of using password authentication, however, the user should click the ... button in the Private key file: field to browse the filesystem and select the .ppk file created when the private key was saved. The default protocol selection (SFTP, with the Allow SCP fallback checkbox checked) is most likely appropriate. With that all done, the user should save the session to make it easier to establish a new connection at a later date by clicking the Save... button.

 

After saving the session configuration, WinSCP will open the stored sessions dialog. Double-clicking the saved session's name will open the session, subject to entering the passphrase for the private key. This is the same passphrase as was entered for the private key in PuTTYgen's key generation dialog, which the user may have saved in a password manager. Once the correct passphrase for the private key has been entered, WinSCP should complete the authentication process, and the file management window will open, allowing the user to move files between the local and remote systems across an encrypted connection.

Of course, when contemplating connecting to a secure Unix system using an SSH client on MS Windows, it is probably a good idea to protect yourself from closed source SSH environments

How to use WinSCP with public key authentication的更多相关文章

  1. 使用public key来做SSH authentication

    public key authentication(公钥认证)是对通过敲用户名.密码方式登录服务器的一种替代办法.这种方法更加安全更具有适应性,但是更难以配置. 传统的密码认证方式中,你通过证明你你知 ...

  2. Putty使用公钥认证时,报错:Disconnected: No supported authentication methods available(server sent:public key) 问题的解决

    Putty使用公钥认证时,按照常规方法设置,一直报错:Disconnected: No supported authentication methods available (server sent: ...

  3. Github 访问时出现Permission denied (public key)

    一. 发现问题: 使用 git clone 命令时出现Permission denied (public key) . 二. 解决问题: 1.首先尝试重新添加以前生成的key,添加多次,仍然不起作用. ...

  4. Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录【已成功实例】

    本文转自https://blog.csdn.net/qjc_501165091/article/details/51278696 ssh登录提供两种认证方式:口令(密码)认证方式和密钥认证方式.其中口 ...

  5. Putty之public key ssh认证入门

    1.工作平台 客户端:Win2kEn Sp3,Putty Beta 0.53 服务器:RedHat72,OpenSSH_3.4p1 2.Putty简介 一个免费小巧的Win32平台下的ssh客户端.它 ...

  6. Domino----The Address Book does not contain a cross certificate capable of validating the public key.

    The Address Book does not contain a cross certificate capable of validating the public key. 地址本不包含交叉 ...

  7. 在iOS中使用OpenSSL的Public Key 进行加密

    这几天一直潜心于iOS开发,刚好把遇到的问题都记录一下.这次遇到的问题就是如果根据得到的Public Key在iOS 客户端对用户名和密码进行加密. Public Key如下: -----BEGIN ...

  8. windows,linux,mac生成ssh public key 和 private key

    https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair Creating the key How you create your SSH ...

  9. 公钥(Public Key)与私钥(Private Key)

    公钥(Public Key)与私钥(Private Key)是通过一种算法得到的一个密钥对(即一个公钥和一个私钥),公钥是密钥对中公开的部分,私钥则是非公开的部分.公钥通常用于加密会话密钥.验证数字签 ...

随机推荐

  1. mysql 实行模糊查询 一个输入值匹配多个字段和多个输入值匹配一个字段

    mysql 实行模糊查询  一个输入值匹配多个字段 MySQL单表多字段模糊查询可以通过下面这个SQL查询实现 为啥一定要150字以上  真的麻烦  还不让贴代码了 SELECT * FROM `ma ...

  2. x64系统下,InpOutx64有数字签名而WinIO3.0无数字签名

    参考文档 http://www.highrez.co.uk/Downloads/InpOut32/ //可以下载InpOutx64的驱动程序及DLL,还有驱动主板硬件IO的例程 https://www ...

  3. CISP/CISA 每日一题

    CISA 业务流程控制鉴证中要考虑的特定因素: 1.流程图 2.流程控制 3.在流程中评估业务风险 4.对最佳实践进行标杆管理 5.角色与责任 6.活动与任务 7.数据限制   信息系统审计师的任务是 ...

  4. [Javascript AST] 4. Continue: Report ESLint error

    const disallowedMethods = ["log", "info", "warn", "error", & ...

  5. javaScript实现选中文字提示新浪微博分享的效果

    <!DOCTYPE html> <html xmlns:wb="http://open.weibo.com/wb"> <head> <me ...

  6. amazeui学习笔记一(开始使用2)--布局示例layouts

    amazeui学习笔记一(开始使用2)--布局示例layouts 一.总结 1.样例分析(不要忘记,优先分析这个布局示例):有教你页面怎么布局的,实例中可以分析一波 2.响应式:对应meta标签中的v ...

  7. 1.1 Introduction中 Distribution官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Distribution 分布式(Distribution) The partiti ...

  8. mysql测试spring事务是否生效

    同时对三张表进行插入操作,事务保证完整性.下面进行简单测试: 1. 锁定表 锁定用户表 LOCK TABLES user WRITE; 查看表是否锁定: show ; 显示被锁定的表. 2. 验证在同 ...

  9. COGS——C 14. [网络流24题] 搭配飞行员

    http://cogs.pro/cogs/problem/problem.php?pid=14 ★★☆   输入文件:flyer.in   输出文件:flyer.out   简单对比时间限制:1 s  ...

  10. ORACLE 11G R2 DG_BROKER 之SWITCH OVER

      官网:http://docs.oracle.com/cd/B12037_01/server.101/b10822/cli.htm 这个是有必要看一下. 注意本人已经完毕一次SWITCHOVER 所 ...