1

Is there any config setting in Net.SSH.Session that will let you set keyboard-interactive I don't see any option to set this in class(%Net.SSH.Session)?

http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?APP=1&LIBRARY=%25SYS&CLASSNAME=%25Net.SSH.Session

s ssh=##class(%Net.SSH.Session).%New()  
w "Connect to "_url_"/"_dir,!
s sc=ssh.Connect(url,port)
s sc=ssh.AuthenticateWithUsername(un,pwd)   
Jefferson
  • 173
  • 2
  • 12
  • 32
  • What do you mean by keyboard-interactive, you expect to get some kind of telnet over ssh, with a possibility to enter some commands? – DAiMor Dec 18 '17 at 22:14
  • In Java I have used JSch and there was a setConfig class I was just looking for that class in COS.'//create object'. 'var jsch = new JSch();' 'jsch.setConfig('StrictHostKeyChecking','no');' 'var session = jsch.getSession(un,url,22);' 'session.setPassword(pwd);' 'session.setTimeout(20000);' – Jefferson Dec 19 '17 at 13:16

1 Answers1

2

Look at Read command http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_cread

r "URL: ",url
r "Dir: ",dir
w "Connect to "_url_"/"_dir,!
s ssh=##class(%Net.SSH.Session).%New()  
s sc=ssh.Connect(url,port)
s sc=ssh.AuthenticateWithUsername(un,pwd)  
SSH
  • 2,533
  • 16
  • 21