Key based authenication with net-sftp in Ruby

后端 未结 2 1351
温柔的废话
温柔的废话 2021-01-05 16:31

I want to be able to use SFTP to login into a number of servers and download certain files to help debug issues as and when they arise. While we could use a client, we wante

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-05 17:06

    It's automatically done, just upload your public key and should work out of the box.

    Connecting using public/private keys

    Public/private keys are always tried before the explicit password authentication, even if you provide a password. Thus, if you only want to use public/private key authentication, simply remove the password from the argument list. If you can successfully obtain a session handle, then your keys are set up correctly!

    • http://net-ssh.rubyforge.org/ssh/v1/chapter-2.html#s2

提交回复
热议问题