Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Asked
Viewed 131 times
-1

Question in the title, but let me detail more. Excluding the ID/Password method on git CLI, we generate a SSH key and add the public key to the remote server. Why don't we have SSH-less public-key cryptography methods? We are not even connecting to remote a machine's terminal, we don't even need to connect a remote machine's terminal (do we?), so why is it named as SSH key? Is it just about naming convention, or something else? What is the history behind that?

5
  • Read man git-shell to clear up some confusion.
    Panki
    –  Panki
    2023-09-07 12:09:06 +00:00
    Commented Sep 7, 2023 at 12:09
  • ssh is both the name of a transport protocol (RFC 4253) and of the secure remote shell which runs on top of that transport. In this case, you are using ssh transport (RFC 4253) and ssh authentication (RFC 4252) to establish a secure authenticated network connection to your git server, even though you are not running a login shell (roughly RFC 4254) on the remote machine. Of course, you have other transport options as well (https) where you would not use ssh keys.
    user4556274
    –  user4556274
    2023-09-07 12:20:14 +00:00
    Commented Sep 7, 2023 at 12:20
  • See stackoverflow.com/q/33846856/2072269 and stackoverflow.com/q/3248779/2072269
    muru
    –  muru
    2023-09-07 12:28:23 +00:00
    Commented Sep 7, 2023 at 12:28
  • 1
    I’m voting to close this question because it's really a question about underlying protocols of a software development tool and not unix/Linux. It might be better placed on stackoverflow or superuser but, as has already been pointed out, it may be duplicate of stackoverflow questions
    Philip Couling
    –  Philip Couling
    2023-09-07 19:03:11 +00:00
    Commented Sep 7, 2023 at 19:03
  • Thank you @user4556274 Panki and muru, those explained a lot.
    katatonic
    –  katatonic
    2023-09-08 09:54:55 +00:00
    Commented Sep 8, 2023 at 9:54

1 Answer 1

1

As one StackOverflow answer says (mentioned in a comment), early in Git's history the ssh protocol had the benefits of supporting both read and write access to the backend repo, as well as cryptographically strong authentication and encryption.

Another benefit of ssh is it allows managing/replacing the keys independently of your deploy software. I.e., your deploy scripts don't have to know how to read the auth token from somewhere and and deliver it to the server.

There certainly are other protocols with comparable functionality, but these are among the reasons that git+ssh became so widely used over the past 10+ years.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.