Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [ssh]

The Secure Socket Shell (SSH) protocol is an authentication protocol (described in RFC 4252) for securely getting access to a remote computer.

2
votes
0answers
49 views

Sharing RSA private key between SSH and SSL services. How bad is it?

An appliance uses a curious way of obtaining ssh-rsa host keys: There is a single configuration option "management certificate" that sets RSA private keys both for HTTPS and SSH management. ...
3
votes
1answer
108 views

Are SSH key-pairs an example of a zero knowledge proof?

Quoting from source, authentication using SSH key pairs goes something like this: 1) The client begins by sending an ID for the key pair it would like to authenticate with to the server. 2) ...
0
votes
3answers
91 views

How is public-key cryptography secure?

Quite strange question, but here goes: I don't quite understand how asymmetric encryption works. Take SSH for an example: The server will always be listening for commands, so anyone who has the ...
1
vote
1answer
61 views

What is the encoding protocol for passphrase protected RSA private keys?

What is the protocol used to encode an RSA key protected with a passphrase? If I generate an RSA key with ssh-keygen -t rsa -b 4096 and do: ...
6
votes
1answer
113 views

Reason for 3 rounds ChaCha in ChaCha20Poly1305@openssh

OpenSSH uses a slightly different ChaCha20Poly1305 AEAD construct then the one proposed by A. Langley and others for TLS. The TLS version The openSSH version (and here) The openSSH version uses two ...
3
votes
1answer
49 views

Does it make sense to have long SSH Key with shorter Passphrase?

If we encrypt our data with a longer SSH key which is protected by a shorter passphrase (with a decent entropy), then the limiting factor is entropy of the passphrase. So why do we use a longer key at ...
2
votes
2answers
92 views

Max size for exponent and modulus in RSA and for y, p, q, g in DSS

I'm writing a method in Java to read SSH public key in RFC 4253 format, which, in my case, can be either RSA, or DSS. What I really need is to read exponent and <...
64
votes
2answers
10k views

Why doesn't SSH use TLS?

Most cryptographically protected protocols use TLS these days. This applies to mail protocols, HTTP and many others. The newly designed QUIC has also adopted TLS as its cryptography layer. However, ...
3
votes
1answer
47 views

SSH sequence number validity?

Looking at RFC4253, I came across the notion that the MAC is applied the encoded packet concatenated with a sequence number which acts as a counter. However, I couldn't find any information on how ...
1
vote
2answers
100 views

how does OpenSSH use bcrypt to set IV's?

I generated an encrypted OpenSSH private key for test purposes: ...
1
vote
1answer
90 views

Why hash ( clear text + Secret ) instead of hash (encrpt(clear text) [ + secret ] )

Here is an excellent article on how SSH Authentication and Encryption works. While thinking about how MAC's work, I had the same doubt as one of the comments left on the post: The client combines ...
3
votes
1answer
114 views

How does authentication work for SSH login with a public key?

For SSH public key authentication in Cisco IOS it is sufficient to add RSA public key hash instead of content of that public key. For example: ...
1
vote
0answers
147 views

See the RSA's $n = p q, e \text{ and } d$ from ssh-keygen

For learning purposes, how to get the RSA's parameters (I use standard notation): $n = p q $, where $p$ and $q$ are prime and $e$, $d$, such that $ed = 1 \ (mod\ \varphi (n)) $ when doing ...
-2
votes
2answers
328 views

Public key cryptography instead of passwords for web authentication

The usual way for a user to authenticate themselves to a website at the application layer is with a shared secret - the user's password. If a user is connecting to a bank, they give the bank their ...
0
votes
2answers
64 views

Security implications of storing an ssh passphrase

I'm trying to understand the security implications of encrypting an ssh key with a passphrase, and storing the passphrase in the MacOS key chain or Gnome key-ring. As I understand it, my ssh key ...
3
votes
1answer
954 views

ed25519 ssh public key is always 80 characters long?

I am creating some ssh keys using ed25519, something like: ...
4
votes
1answer
318 views

Is encrypt-and-MAC secure for AES-CTR + UMAC?

OpenSSH will (especially in older versions) use AES-CTR plus a MAC in encrypt-and-MAC. This is not secure in general (meaning that there exist secure ciphers and secure MACs such that using them in ...
2
votes
0answers
127 views

Can I use a GnuPG created key for OpenSSH or authentication purposes? [closed]

I created a key pair using PGP (GnuPG) for the purpose of encrypting and signing data (documents, emails, and so on). That key was created with the RSA algorithm, and naturally starts with: -----...
8
votes
3answers
3k views

How many KDF rounds for an SSH key?

What is the best practice on choosing how many key derivation function (KDF) rounds/iterations when generating an SSH key pair? Am I correct in saying that it is unnecessary if the passphrase is ...
1
vote
3answers
518 views

Which hash function is used for signatures ssh-rsa and ssh-dss?

I'm building a fuse client for ssh/sftp. I write the required ssh and sftp functions myself. Now I read in RFC4253 that before signing the data to sign is default hashed. In RFC4253 8. "Diffie-Hellman ...
0
votes
0answers
56 views

Why public host key still need be sent in SSH_MSG_KEX_DH_GEX_REPLY?

RFC 4251(https://tools.ietf.org/html/rfc4251) states, [page 4] The protocol provides the option that the server name - host key association is not checked when connecting to the host for the ...
2
votes
1answer
276 views

server_host_key_algorithms in SSH

RFC 4253 "The Secure Shell (SSH) Transport Layer Protocol" states on page 18: ...
2
votes
0answers
290 views

Why SSH does not use a certificate authority in the same way as SSL [closed]

SSL requires the use of a trusted third party -- the certificate authority to verify a public key presented by a server to a client. SSH on the other hand relies on the client having the server's ...
7
votes
1answer
12k views

Can a server's ECDSA fingerprint be spoofed during SSH?

I have read somewhere that Servers which have SSH access for users in the public can have their public key posted publicly (e.g., on a website), so that people who access such a server using SSH can ...
4
votes
1answer
4k views

Why ssh-gen makes difference between PEM and PKCS8?

Correct me if I am wrong, but PKCS8 is format to store private key info. It could be binary-enoded (DER) or Base64 encoded (<...
4
votes
0answers
407 views

How does TLS differ from SSH from a strictly cryptographic perspective?

How does TLS differ from SSH from a strictly cryptographic perspective? I know that there are many non-cryptographic differences between them, but I would like to know the cryptographic ones.
59
votes
1answer
5k views

Why does my SSH private key still work after changing some bytes in the file?

I (for a test) just randomly altered a private RSA key by opening it up in Vim and changing a few bytes. It is the private part of an SSH key pair used for logging in on a remote system. Puzzlingly, ...
2
votes
0answers
66 views

Why are the first 4-6 characters from ssh-keygen (RSA) the same everytime? [duplicate]

New to StackExchange, so please bear with the newbie. At my current job we are often creating many ssh keys with ssh-keygen (RSA). One thing I have noticed is that the first few characters (say the ...
1
vote
0answers
586 views

Fingerprint RSA public key in PKCS1 format [closed]

I can't find anywhere details on how to fingerprint a public RSA key in PKCS1 format. There are a lot of examples on the internet on how to fingerprint an RSA public key in openssh format using ...
8
votes
1answer
5k views

Why can ssh-keygen export a public key in PEM PKCS8 format?

In the documentation of ssh-keygen (man ssh-keygen) it says for the option -m that an export ...
5
votes
1answer
3k views

Recommended password complexity for SSH key encryption using AES-256-CBC

When protecting SSH private keys with password-based encryption, what would be a good minimum password complexity+length standard to make cracking the password too difficult to be worthwhile anytime ...
2
votes
1answer
317 views

ssh-keygen DH Primality Testing

I'm pretty familiar with using ssh-keygen to create groups that go in the /etc/ssh/moduli file for the Diffie-Hellman Group Exchange in openssh. Reading over the man page, it says "By default, each ...
1
vote
1answer
397 views

SSH rekey security implications

When an SSH session is rekeyed due to either the time limit or data limit for rekeying having passed, does the Diffie-Hellman exchange take place within the encrypted channel provided by the existing ...
3
votes
1answer
2k views

Why is diffie-hellmangroup1-sha1 used instead of diffie-hellman?

For SSH why is diffie-hellmangroup1-sha1 used instead of just diffie-hellman? In other words, why is the hash function used?
0
votes
1answer
983 views

MAC in SSH packet encryption, benefits to not including it?

What are the benefits to not including MAC in a SSH packet encryption? I understand what the MAC is there for, but if it was not included would there be an advantage? Is the MAC somewhat redundant ...
2
votes
0answers
288 views

What are the well known protocols that offer perfect forward secrecy? [closed]

As far as I know these are the well known protocols that offer PFS TLS/SSL (with DHE-RSA, DHE-DSS, ECDHE-RSA or ECDHE-ECDSA) SSH (RFC4253) OTR (Protocol Version 3 Spec) IPsec (with IKEv1 and IKEv2) (...
0
votes
4answers
478 views

what is it called when encrypt('a') + encrypt('a') == encrypt('aa')?

So normally if you do encrypt('a') twice in a row you'll get the same result. But sometimes (as is the case in SSH) this is not desirable. You want encrypt('a') + encrypt('a') == encrypt('aa'). What ...
2
votes
0answers
139 views

Does the SSH protocol preserve integrity if an endpoint is cloned?

I am trying to find out if the SSH protocol preserves integrity of the transferred data in the following scenario: The SSH client is running on a virtual machine, at some point in the middle of the ...
4
votes
1answer
235 views

Is it safe to derive a password from a signature provided by ssh-agent?

I'd like to use a password-based system on a remote host (accessed via SSH) without having to copy-and-paste the password and without storing it on disk. Using the system with some other form of ...
28
votes
1answer
27k views

Can I remove newlines in a public key?

Can I remove new lines from the RSA public key file to get a one line string? So the question is if the key looks like this AAA BBB CCC or ...
12
votes
3answers
49k views

AES256-CBC vs AES256-CTR in SSH [duplicate]

I used AES256-CBC to SSH to a remote server. Recently, it stopped working with the following message: ...
9
votes
3answers
5k views

Why does Openssh use only SHA1 for signing and verifying of digital signatures?

I am learning SSH protocol. With my current understanding of SSH protocol, I think that message digest algorithms for using in digital signature should be derived from Key Exchange. But Openssh ...
2
votes
2answers
1k views

My SSH server public key is 2048 bits, but my account's private key is 4096. What is my effective security?

My SSH server has a 2048-bit public key. But my private key, for clients to login, is 4096-bit. In this case, do I have the brute force protection of 2048 or 4096 bits? My worry is that someone ...
7
votes
1answer
859 views

Is SSH public key authentication weakened by 'none' cipher?

As far as I know, SSH2 first does a key exchange based on the server host key and brings up transport authentication and encryption derived from this kex. The real authentication (password or public ...
6
votes
1answer
618 views

How hard is it to generate a partial RSA fingerprint collision?

When I use SSH to log into a new system, I get asked to verify that the fingerprint (a 32 hex digits string) of the hosts's RSA key is correct. How much if it must I actually compare (by hand/eye) to ...
1
vote
2answers
1k views

Does key authentication in SSH protect from MitM?

How do cryptography in SSH(2) work (secure channel establishment, authentication)? Does key authentication in SSH(2) protect from MitM by providing authentication and integrity and why?
4
votes
2answers
477 views

It is reasonably safe to leave a SSH private key with a 30+ character passphrase public?

I'm curious about exploring uses for a distributing a single RSA private key with a passphrase instead of trying to secure the private key and distribute the public key. With the private key (and ...
6
votes
1answer
10k views

GPG vs PGP vs OpenSSH and management of them [closed]

What is the main difference of the three? Can I use only one of them for everything (e.g. GPG for SSH authentication) If I encrypt my private key with a pass-phrase, is it strong enough so that if ...
30
votes
1answer
10k views

Why do all SSH-RSA Keys begin with “AAAAB3NzaC1yc”?

My Friend and I have been generating a few ssh2-rsa keys and noticed that all the public keys began with "AAAAB3NzaC1yc". The similarity extended to "AAAAB3NzaC1yc2EAAAABIwAAAQEA" between two keys I ...
3
votes
5answers
1k views

Would this simple encrypted chat program be feasible using One Time Pads?

Lets say I want to build a simple chat program that has encryption that is impossible to crack for anyone, even a theoretical government with a massive super computer. Ok here's my idea. You'll need ...