[英]SFTP - From WinSCP to Terminal Access
I have been able to set up SSH access to my Google Cloud Platform VM via SFTP using WinSCP, but I now wish to do the same using another VM. 我已经能够使用WinSCP通过SFTP设置对我的Google Cloud Platform VM的SSH访问,但是现在我希望使用另一个VM进行相同的操作。
I have tried the ssh-keygen -t rsa , ssh-copy-id demo@198.51.100.0 method but always come up against the "Permission denied (public key)" error which from researching seems to be a pretty widespread issue with few reliable fixes (all the ones I tried didn't work). 我已经尝试过ssh-keygen -t rsa,ssh-copy-id demo@198.51.100.0方法,但是总是遇到“权限被拒绝(公共密钥)”错误,从研究看来这是一个非常普遍的问题,几乎没有可靠的修复(我尝试过的所有方法均无效)。
I used PuttyGen to create the public and private key, and inserted the public key onto the server just through GCP settings, adding it under the SSH settings for my instance. 我使用PuttyGen创建了公钥和私钥,然后仅通过GCP设置将公钥插入到服务器上,并将其添加到实例的SSH设置下。
I am just confused on what to do with the private key when simply trying to sftp through the terminal on a separate VM, as before I would load the private key into WinSCP settings. 当我试图通过单独的VM上的终端通过sftp进行操作时,我只是对如何处理私钥感到困惑,就像之前我将私钥加载到WinSCP设置中一样。 Is there a folder I need to place it in or? 是否需要放置一个文件夹?
Regarding your first issue of "Permission denied (public key)" error, please follow the troubleshooting in this link and this . 关于您的第一个问题“权限被拒绝(公共密钥)”错误,请按照此链接和this中的疑难解答进行操作。
About your other question of "what to do with the private key when simply trying to sftp through the terminal", that depends on the settings of the specific the 3rd party SFTP tool you are using. 关于另一个问题“仅在尝试通过终端sftp时如何处理私钥”,这取决于所使用的特定第三方SFTP工具的设置。 To locate the locations of SSH key after generating them, please review this document . 要在生成SSH密钥后找到其位置,请查看此文档 。
Once you have added the public key in the VM, you would need to boot the VM for public key to take effect. 在VM中添加公钥后,您需要引导VM才能使公钥生效。 Try rebooting it and try 尝试重新启动并尝试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.