Stack Exchange Network

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

0
votes
0answers
65 views

How the counter of AES-CTR in SSH is used

I am currently trying to decrypt an SSH session using memory derived keys and IVs. My current problem is that the counter value seems to be the IV plus some value < 256. My question is now why the ...
1
vote
2answers
72 views

How does the SSH server know the length of data encrypted?

In am learning the SSH RFC An encryption algorithm and a key will be negotiated during the key exchange. When encryption is in effect, the packet length, padding length, payload, and ...
0
votes
3answers
131 views

Is the curve25519 algorithm a special(implementation) one of ECDH?

It's the first time for me to learn about Key Exchange Protocol. And I thought that in both ECDH and DH there is a necessary step to share some public infomation(the common parameters) to each sides ...
0
votes
1answer
44 views

Book request about elliptic curves, RSA and DSA

I understand that this question can be hardly downvoted, but so be it if someone gives me really useful references :) I wanna learn difference (deeply) between RSA, DSA, and ECC, especially I am ...
1
vote
1answer
57 views

Is there any point to encrypting a file if it's transferred via ssh?

Suppose I have two machines which can ssh into each other. Is there very little point in using gpg with a password protected symmetric cipher to transfer a ...
1
vote
2answers
189 views

how does AES GCM in SSH work?

I was looking at RFC5647: AES Galois Counter Mode for the Secure Shell Transport Layer Protocol and had some questions about section 7.1 "IV and Counter Management". Here's that section: ...
2
votes
0answers
160 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
172 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
128 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
305 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
158 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
65 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
166 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 <...
69
votes
2answers
14k 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
62 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
156 views

how does OpenSSH use bcrypt to set IV's?

I generated an encrypted OpenSSH private key for test purposes: ...
1
vote
1answer
118 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
151 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
322 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 ...
-1
votes
2answers
509 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
67 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 ...
4
votes
1answer
1k views

ed25519 ssh public key is always 80 characters long?

I am creating some ssh keys using ed25519, something like: ...
3
votes
1answer
426 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
128 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: -----...
11
votes
3answers
5k 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
649 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
66 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
357 views

server_host_key_algorithms in SSH

RFC 4253 "The Secure Shell (SSH) Transport Layer Protocol" states on page 18: ...
2
votes
0answers
564 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 ...
6
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
5k 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 (<...
5
votes
0answers
659 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.
60
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
74 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
666 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
6k 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 ...
1
vote
1answer
345 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
446 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
1k 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
330 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) (...
-2
votes
3answers
559 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 ...
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 ...
5
votes
1answer
246 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 ...
31
votes
1answer
34k 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
54k 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
6k 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
908 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 ...