Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 834863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:44:14+00:00 2026-05-15T04:44:14+00:00

as a small (large) hobby project I’ve set out to make a (very primitive)

  • 0

as a small (large) hobby project I’ve set out to make a (very primitive) ssh-2.0 client in C#.
This is to explore and better understand DH and help flourish my encryption familiarities 🙂

As per RFC 4253, I’ve begun the initial connection like this:

(leaving out irrelevant presetting of vars etc.)

Random cookie_gen = new Random();
while ((ssh_response = unsecure_reader.ReadLine()) != null)
{
   MessageBox.Show(ssh_response);
   if (ssh_response.StartsWith("SSH-2.0-")
   {
      // you told me your name, now I'll tell you mine
      ssh_writer.Write("SSH-2.0-MYSSHCLIENT\r\n");
      ssh_writer.Flush();
      // now I should write up my supported (which I'll keep to the required as per rfc 4253)
      ssh_writer.Write(0x20); // SSH_MSG_KEXINIT
      byte[] cookie = new byte[16];
      for (int i = 0; i < 16; i++)
         cookie[i] = Convert.ToByte(cookie_gen.Next(0, 10));
      ssh_writer.Write(cookie); // cookie
      // and now for the name-list
      // This is where I'm troubled

      // "Footer"
      ssh_writer.Write(0x00); // first_kex_packet_follows
      ssh_writer.Write(0x00); // 0
      ssh_writer.Flush();
   }
}

As you can see on page 16 of RFC 4253, I’m expected to give 10 name-lists. Are these simply suppose to be strings, or how do I mark start/end of each list (simply by newline \n)? Am I even on the right track here? (keep in mind I will handle DH and encryption past this point. My question is solely based on the initial contact so far).

Any help or comments are welcomed and appreciated,

PS: I’m aware libraries exist, but this is not relevant to my project.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:44:14+00:00Added an answer on May 15, 2026 at 4:44 am

    Well, as RFC 4251 states on page 9:

    Terminating null characters MUST NOT be used, neither
    for the individual names, nor for the list as a whole.

    There are also examples in the named RFC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a very large file and extracting some small portions of text
According to this there are four size screens, small, normal, large and xlarge. So
I am writing a small I/O library to assist with a larger (hobby) project.
I have this toggleClass function: $(document).ready(function() { $(button#playersize).click(function(){ $(#wrapper).toggleClass(small large); $(.divone).toggleClass(small large); $(.divtwo).toggleClass(small large);
Is it better to transfer small or large strings by reference in C#? I
I have developed three different versions(as different projects) of an app(large,normal,small). How can I
I want to process large amount of small images on HDFS. Hadoop provides archive
I made small program to divide large pictures and take part of them. When
I work on a small Agile development team which is part of a large,
What's the Fastest way to get a large number of files (relatively small 10-50kB)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.