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 8035463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:19:08+00:00 2026-06-05T02:19:08+00:00

For educational purposes I’m implementing a simple remote shell program, and I’m trying to

  • 0

For educational purposes I’m implementing a simple remote shell program, and I’m trying to wrap my head around how to make it somewhat secure. The first idea I had was to just require a password. If the client sends the password, it runs, if not, it quits. Then, I applied a simple hash function to the password, but I don’t think this really makes it any more secure. In either case, if the packets are intercepted, an attacker could just extract the password or the hashed password. What can I do to make this more secure Is there a way to use password/hashing that is safe from basic packet interception? I know that ssh uses public/private keys to encrypt and decrypt, but that is more advanced than I need.

  • 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-06-05T02:19:09+00:00Added an answer on June 5, 2026 at 2:19 am

    How about a challenge/response with digests? Say the server knows the password is "blah".

    The client connects, and authenticates:

    • Client: Let me in!
    • Server: I give you the challenge "12345", a number I generated just now!

      Server remembers that they gave the client "12345".

    • Client wants to authenticate with "blah", so they add it to the end of the server’s challenge, and then calculates the SHA-1 of the result "12345blah".

      Client: My response is "6910972fb3148a63df7fda34bd6fccf3013d8d93"!

    • Server knows the password is "blah", and issued the challenge "12345" to this client—hence it calculates the SHA-1 of "12345blah", and produces "6910972fb3148a63df7fda34bd6fccf3013d8d93". This matches the client’s response so …

      Server: Access granted!

    Important notes:

    • The server MUST be the one to choose the challenge. If the client gets to pick, then an attacker could just intercept one authentication attempt, and repeat the same challenge and response as that valid user.

      The fact that the server picks a different challenge every time means an attacker can’t replay authentication. This means the server needs to store the challenge against the client’s connection or session somehow, since you’ll need it when they respond.

    • You may want to use something stronger than SHA-1 (it’s a little broken IIRC). You may also want to do something other than just appending the password to the challenge, as the security properties depend on the underlying digest function.

    • I demonstrate this with a password "blah", but the nice thing is now, you can replace "blah" with the hash of "blah". The server never needs to store more than the hash, and then the client just hashes their password first before combining with the challenge and calculating the digest.

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

Sidebar

Related Questions

I am trying to build my own simple MVC framework, mainly for educational purposes
My git repository has ~2,000 commits. For educational purposes, I have been playing around
For an educational website, it is my purpose to let students fool around somewhat
Hey Simple little app for educational purposes, its a simple uitableview and I want
I'm trying to make a simple msn client mostly for fun but also for
For educational purposes I tried to make a server and client where the server
I am implementing a Harris corner detector for educational purposes but I'm stuck at
I want to write a simple compiler for educational purposes in Delphi. I have
I'm making a simple boost::any -like class for educational purposes, but I can't figure
I'm trying to (for educational purposes) create a image format, in order to display

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.