Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Multi-Threaded SSH Driver with RSA Key Authentication   

Solved1.57K views4th March 2021Multi-Threaded Timer RSA SSH
5
Saddam Zourob [DevOps Member]363 3rd March 2021 0 Comments

Hi All,

I am developing a multi-threaded SSH protocol that will send multiple commands that are in a table to the server. I am using an RSA key to authenticate with the server. The key was tested with a normal SSH driver that communicates with the same server.

I am following the instructions stated on this page: Multi-Threaded SSH

I am providing the file name in the SSH settings array while preparing the request and I leave the password variable empty.

string[] sshSettings = new string[6];
sshSettings[0] = userName;
sshSettings[1] = ""; //Password is empty
sshSettings[2] = @"key=C:\SSH_Keys\vitcmon-id_rsa";
sshSettings[3] = Convert.ToString(timeout);
sshSettings[4] = responseTrailer;
sshSettings[5] = Convert.ToString(trailerResponseOccurrenceCount);

In addition, I provide the key algorithm in the requestInfo[2] as follow:

object[] requestInfo = new object[3];
requestInfo[0] = sshSettings;
requestInfo[1] = sshCommands;
requestInfo[2] = new string[1] { "ssha-rsa"};

The SLSSH logs file shows the following error:

2021-03-03 08:40:36 - 5727 - Open 1
2021-03-03 08:40:36 - 5727 - 'Open' completed
2021-03-03 08:40:36 - 5727 - Notify (SetOptions) exception: Tamir.SharpSsh.jsch.JSchException: System.IO.FileNotFoundException: Could not find file 'C:\SSH_Keys\vitcmon-id_rsakexAlgorithms=ssha-rsa'.
File name: 'C:\SSH_Keys\vitcmon-id_rsakexAlgorithms=ssha-rsa'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Tamir.SharpSsh.jsch.IdentityFile..ctor(String identity, JSch jsch)
at Tamir.SharpSsh.jsch.IdentityFile..ctor(String identity, JSch jsch)
at Tamir.SharpSsh.jsch.JSch.addIdentity(String privateKeyFile, String passPhrase)
at Tamir.SharpSsh.SshBase.AddIdentityFile(String privateKeyFile, String passphrase)
at Skyline.SSH.SshConnection.ParseOptions(String optionsString)
at Skyline.SSH.SshConnection.Notify(Int32 type, Object val1, Object val2, Object& outval)
2021-03-03 08:40:36 - 5727 - Close
2021-03-03 08:40:36 - 5727 - Close Shell
2021-03-03 08:40:36 - 5727 - Close complete

The file name is concatenated with the kexAlgorithms which makes the file name invalid!

Did anyone notice this happening before? Could this be a software bug?

Saddam Zourob [DevOps Member] Selected answer as best 4th March 2021

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Wouter Demuynck [SLC] [DevOps Advocate]5.91K Posted 3rd March 2021 2 Comments

Hi Saddam,

This appears to be an issue which existed in versions prior to 10.0.3 / 10.1.0 and was fixed as part of the changes to support SSL/TLS for serial connections (RN)

A possible workaround might be to add a semicolon when specifying the key=xxxx option:

sshSettings[2] = @"key=C:\SSH_Keys\vitcmon-id_rsa;";

The extra semicolon should make it so the options get properly separated when parsing.

Saddam Zourob [DevOps Member] Selected answer as best 4th March 2021
Saddam Zourob [DevOps Member] commented 4th March 2021

Thanks, Wouter.

That exception disappeared from the logs. However, I started to see this new exception.

2021-03-04 06:35:55 – 5895 – Create Object
2021-03-04 06:35:55 – 5895 – Open 1
2021-03-04 06:35:55 – 5895 – ‘Open’ completed
2021-03-04 06:35:55 – 5895 – Set Timeout 5000
2021-03-04 06:35:55 – 5895 – Set RetryTime 5000
2021-03-04 06:35:55 – 5895 – Connect -1
2021-03-04 06:35:58 – 5895 – Connect exception: Tamir.SharpSsh.jsch.JSchException: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: port
at System.Net.IPEndPoint..ctor(IPAddress address, Int32 port)
at Tamir.SharpSsh.java.net.Socket..ctor(String host, Int32 port)
at Tamir.SharpSsh.jsch.Util.CreateSocketRun.run()
at Tamir.SharpSsh.jsch.Util.CreateSocket(String host, Int32 port, Int32 timeout)
at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
at Tamir.SharpSsh.jsch.Session.connect()
at Tamir.SharpSsh.SshBase.ConnectSession(Int32 tcpPort)
at Tamir.SharpSsh.SshBase.Connect(Int32 tcpPort)
at Skyline.SSH.SshConnection.Connect()
2021-03-04 06:35:58 – 5895 – Connect complete (2281.2668ms)
2021-03-04 06:35:58 – 5895 – Close
2021-03-04 06:35:58 – 5895 – Close Shell
2021-03-04 06:35:58 – 5895 – Close complete

Saddam Zourob [DevOps Member] commented 4th March 2021

The fix for this second issue was to add an IP:Port column in the table of commands and fill it with the IP:Port of the host I am communicating with. In addition, I updated the Multithreaded Timer “ip” value to use the IP:Port Column instead of the keys column

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin