Coder Social home page Coder Social logo

Comments (8)

HsuJv avatar HsuJv commented on May 27, 2024

暂时没有支持,目前逻辑应该是等价于 StrictHostKeyChecking=no

BRs

from ssh-rs.

jianfang-git avatar jianfang-git commented on May 27, 2024

谢谢您的回复,PreferredAuthentications这个参数的设置应该也没有吧。ssh登录的时候会弹出Kerberos身份验证提示,在jsch里可以通过设置put("PreferredAuthentications", "publickey,keyboard-interactive,password")来解决弹出提示的问题

from ssh-rs.

HsuJv avatar HsuJv commented on May 27, 2024

对,我们还没做gssapi认证的支持,目前只支持公钥和密码两种认证模式,
等价于jsch里面的 put("PreferredAuthentications", "publickey,password")
每次连接的时候都会优先去尝试公钥认证,当且仅当没有私钥文件加载或者认证失败时会回退到密码认证,如果密码认证失败就会断开。
您可以同时设置私钥文件路径和用户名密码,ssh本身是支持一条连接多次认证尝试的。

Brs.

from ssh-rs.

jianfang-git avatar jianfang-git commented on May 27, 2024

期待以后的版本中能有这个支持,谢谢

from ssh-rs.

HsuJv avatar HsuJv commented on May 27, 2024

您的应用场景是需要连接到只接受gssapi认证的ssh服务器吗?
如果只是想类比jsch解决弹出提示问题的话,因为我们不支持gssapi所以天然不存在类似问题。
如果必须要使用gssapi认证的话可能我们的库暂且无法使用。
我们会在后续的开发中加入gssapi认证的计划。

BRs

from ssh-rs.

jianfang-git avatar jianfang-git commented on May 27, 2024

应用场景中不需要连接gssapi认证的服务器。
连接的服务器比较多,每个服务器设置私钥很麻烦的。类似ssh client连接需要私钥的ssh服务器,可以通过keyboard-interactive输入密码实现正常认证登录。

from ssh-rs.

HsuJv avatar HsuJv commented on May 27, 2024

理解了,是需要在认证过程中提供回调函数来输入用户名密码,当然目前也可以在建立session前先行询问用户名密码作为workaround

BRs

from ssh-rs.

jianfang-git avatar jianfang-git commented on May 27, 2024

在用jsch的时候,最开始就放弃了publickey的方式,采用了keyboard-interactive和password登录方式,但有个问题,每个ssh服务器需要确认是否可以用password认证登录(如果可以就用password登录方式,否则用keyboard-interactive方式登录),并提前做好标志。后来发现在jsch设置一个("PreferredAuthentications", "publickey,keyboard-interactive,password"),然后直接按password的登录方式即可,很方便

from ssh-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.