Skip to main content

Questions tagged [openssh]

A free and open implementation of the SSH communication security tools.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

sshd won't start from xinetd in OpenSSH 9.8p1 [migrated]

We start sshd using xinetd on our gateway. Here is the xinetd config file: service ssh { instances = 10 socket_type = stream wait = no user = root ...
follie2000's user avatar
1 vote
0 answers
58 views

OpenSSH 9.6p1: What is the best key type for the ssh-keygen command through the -t option? [duplicate]

The ssh-keygen command to generate the pair of keys files can use the -t option. According to Ubuntu Noble's man ssh-keygen for the mentioned option, it indicates: -t dsa | ecdsa | ecdsa-sk | ed25519 |...
Manuel Jordan's user avatar
11 votes
1 answer
452 views

XZ compromise and consequences for people having used it

Here's a hot topic: https://www.redhat.com/en/blog/urgent-security-alert-fedora-41-and-rawhide-users https://lwn.net/Articles/967180/ https://lwn.net/ml/oss-security/20240329155126.kjjfduxw2yrlxgzm@...
Artem S. Tashkinov's user avatar
0 votes
0 answers
15 views

ssh-keygen fido2 keys without password [duplicate]

ssh-keygen -t ed25519-sk -O resident -C "yubikey-fido1 My understanding is that I should be able to generate openssh keys with fido2 without password and require touch-only. While that opens up ...
cen's user avatar
  • 275
0 votes
1 answer
94 views

SSH-Agent writing unencrypted keys to swap memory

I have recently set up a computer with full disk encryption, and I decided not to encrypt the swap partition for performance reasons. I have been using ssh-agent on another computer to load my private ...
rcomeau's user avatar
0 votes
0 answers
134 views

Is using OpenSSH Authentication Agent on Windows 11 a secure practice?

I use a passphrase on my SSH key used for git. I wanted to be able to use the same git for a few scripts I run to clone/pull a bunch of my repos. I discovered that I don't have to repeatedly enter my ...
Scorb's user avatar
  • 111
0 votes
0 answers
151 views

How safe is it to run an un unpatched, internet-exposed OpenSSH service?

There have recently been several reported security issues with OpenSSH (Terrapin, double-frees, remote execution, X11 forwarding vulnerabilities..). How safe is it for a server to expose OpenSSH (...
benjimin's user avatar
  • 165
0 votes
0 answers
79 views

How do I check if my PowerShell is connected on SSH?

I know how to check but command line cmd or powershell can be altered to make it look clean with disguised hash codes (which they show like they are not tempered but actually commands are altered and ...
kurosakichigoo's user avatar
1 vote
2 answers
406 views

Consequences of .ssh/authorized_keys being world-readable

OpenSSH sshd enforces mode 0600 for authorized_keys when StrictMode is enabled. How is mode 0644 more vulnerable?
OLEGSHA's user avatar
  • 135
0 votes
1 answer
122 views

Besides intended usage, what is the difference between a host key and a user key?

The ssh-keygen program has -h flag for creating a host key. What is the actual difference between keys created with and without -h? Is there any reason I could/should not use a host key as a user key ...
Keith Wolters's user avatar
1 vote
2 answers
4k views

How to update Ubuntu SSH version to latest version [closed]

I'm trying to update the Ubuntu OpenSSH version to 9.3p2, because of the CVE-2023-38408 vulnerability, but I can't. The recomendation is update to last version: https://ubuntu.com/security/CVE-2023-...
Jhon Laurence's user avatar
1 vote
1 answer
3k views

Configuration option PubkeyAcceptedKeyTypes vs PubkeyAcceptedAlgorithms?

I'm using OpenSSH 8.9p1. I'm trying to connect to a git via SSH, and I'm getting no matching host key type found. Their offer: ssh-rsa I was able to fix the problem by adding the following to my ~/....
Evan Carroll's user avatar
  • 2,883
7 votes
1 answer
9k views

Understanding ssh-rsa not in PubkeyAcceptedAlgorithms

I am having problem in connecting to an Amazon EC2 Linux instance from an old Mac OS machine running El Capitan. Unfortunately without any possibility to upgrade the OS. Because all the other modern ...
Leonardo's user avatar
  • 173
1 vote
0 answers
1k views

What are the risks of running SSH over Tor?

Goal The intention is to set up an SSH entrance which is more secure (or at least more obfuscated) than a default setup with Port Forwarding or VPN. Previous research and context TL;DR, see question ...
Saul Goodman's user avatar
4 votes
1 answer
541 views

Can someone with access to only my Yubikey gain access to my server that has SSH access via an ED25519-sk keypair?

My understanding is that an ED25519-sk SSH key generated by OpenSSH generates a private key stub that lives on your host machine. This stub is just a reference to the actual private key that lives on ...
angryserver's user avatar
2 votes
0 answers
190 views

How do you know what KDF was used to protect an SSH-Key?

Assuming I have found several OpenSSH private keys on my client's system, how can I detect (at scale) which of them are: completely unprotected (i.e. no passphrase) using an old hashing algorithm for ...
John Nemo's user avatar
1 vote
3 answers
749 views

Is it possible to retrieve the public-key from an encrypted or passphrase-protected ssh private-key?

I have created an open-ssh keypair using ssh-keygen with the defaults, and encrypted the private key with a passphrase. I already know how to derive the public-key from the private-key using ssh-...
Sami's user avatar
  • 31
4 votes
2 answers
1k views

SSH XMSS keypair generation and best practices

In a recent ssh -vv output, I saw OpenSSH mentioning a private key file id_xmss. XMSS is defined in RFC 8391, "XMSS: eXtended Merkle Signature Scheme", May 2018. OpenSSH has experimental ...
Tom Hale's user avatar
  • 3,055
20 votes
1 answer
5k views

Why did OpenSSH create its own key format, and not use PKCS#8?

Before posting this question about ed25519, I learned that there are two formats for storing a private ed25519 key, PKCS#8 OpenSSH Format Why did OpenSSH create its own format rather than use PKCS#8?...
Evan Carroll's user avatar
  • 2,883
11 votes
4 answers
9k views

How can I convert an ED25519 key in PKCS#8 to OpenSSH private key format?

I'm having a problem where when I export a key from 1password, and use it with ssh -i, I get Load key "/home/user/.ssh/private_ed25519": invalid format Doing a google search on this, it ...
Evan Carroll's user avatar
  • 2,883
1 vote
0 answers
1k views

Reading SSH private key physically stored on yubikey to remote into external PC

I was wondering if it's possible to only store and read a ssh private key on a yubikey and not read the private key the yubikey generated from a client computer? Currently the only way it seems to ...
SneakyShrike's user avatar
1 vote
0 answers
467 views

SSH authentication with GPG failing with a new Yubikey with the same gpg keys as the old one

I have a MacBook M1 on which I have been using a Yubikey 5 to authenticate SSH logins to various systems. I recently got a Yubikey 5C so I wouldn't have to use adapters. I moved my keys over to it ...
user28598's user avatar
0 votes
1 answer
135 views

Does the ssh client compute the public key from the private key?

If I use ssh like this ssh -i id_rsa it means im passing the private key to ssh. Does ssh now then compute the public key from it and then send it to the server? Then the server would look if the ...
idontknowwhatggww's user avatar
1 vote
1 answer
487 views

When hardening my SSH key, why would I use yubikey-agent instead of the built-in `-sk` key type native to OpenSSH?

OpenSSH 8.2 added -sk key types that allow for FIDO/U2F hardware authenticators (like a YubiKey, etc.) yubikey-agent allows for the same functionality, except it (a) requires an additional client on ...
angryserver's user avatar
1 vote
1 answer
1k views

How to extract a RSA private key from an ssh-agent core dump

I need to extract an RSA private key from an ssh-agent core dump running on ubuntu 20.04. I believe the ssh version is the latest. I have tried many Linux tools with no luck. I also wrote a python ...
Wesley Jones's user avatar
2 votes
2 answers
6k views

OpenSSH Disabling Diffie-Hellman (DHE) key exchange

I'm seeking to mitigate CVE-2002-20001 by disabling DHE key exchange through OpenSSH on an Ubuntu instance. I understand this can be achieved through editing the /etc/ssh/sshd_config at line ...
user281564's user avatar
0 votes
1 answer
937 views

SSH strict "pubkey with a password" required for login?

Did i misunderstand from this post? RequiredAuthentications2 | Usually this is done to require pubkey and 2-factor authentication token, not the user's password. you can use RequiredAuthentications2 ...
Z0OM's user avatar
  • 119
1 vote
2 answers
747 views

Cannot use "ecdsa" and "rsa" in parallel when using SFTP

When I connect to my "OpenSSH_8.2p1 Ubuntu-4ubuntu0.4" server alternating using sftp -v -o HostKeyAlgorithms=ecdsa-sha2-nistp256 test-user@localhost and sftp -v -o HostKeyAlgorithms=rsa-sha2-...
becke-ch's user avatar
  • 111
3 votes
1 answer
3k views

ssh-keygen fingerprint format is different between RSA+ECDSA and ED25519

I noticed that when showing the fingerprint of different key types, there is one difference in the format. for some reason ED25519 has the hash bits (I guess?) - 256, whereas the other key types have ...
Roy Ca's user avatar
  • 141
3 votes
1 answer
1k views

How can ssh-keygen be used to update /etc/ssh/moduli?

I have some machines whose primes in /etc/ssh/moduli are now considered too weak because they are less than 2048 bits. There are a couple questions on this site concerning the consequences of updating ...
firebush's user avatar
  • 133
1 vote
3 answers
2k views

Why are FIDO2 protected SSH keys affected by phishing attacks?

The OpenSSH developers have written in a description of the "agent restrictions" feature that FIDO2 tokens are vulnerable to phishing attacks: https://www.openssh.com/agent-restrict.html ...
student_at_work's user avatar
1 vote
1 answer
160 views

ssh server encrypted key vs password login [duplicate]

In an openssh-server login to a GNU/Linux machine to use a private ssh key encrypted with an N-characters passphrase, then sshd_config: PasswordAuthentication no PubkeyAuthentication yes is it ...
stefd's user avatar
  • 121
0 votes
3 answers
1k views

Best practices for securing SSH access? Is certificate-based VPN server a good solution?

I run a server on a hosting. I want to harden it, but ssh access is giving me a bit of concerns. I usually access from home most of the times. I have a provider subscription with the usual DHCP setup ...
unsafe_where_true's user avatar
2 votes
1 answer
310 views

OpenSSH Primes - can there be such a thing as "too few" primes available?

The (old) Secure Secure Shell guide suggests (re)creating /etc/ssh/moduli so sshd has safe prime numbers to use for Diffie-Hellman key agreement. I've generated a 4096-bit moduli file with ssh-keygen -...
mgarciaisaia's user avatar
2 votes
0 answers
321 views

Is it possible to regenerate the stub private key from just the physical key in OpenSSH?

Let's say I make an id of type ed25519-sk and have it reside on my yubikey. OpenSSH makes two files, id_ed25519_sk, a stub private key, and id_ed25519_sk.pub the corresponding public key. If I lose ...
nimish's user avatar
  • 121
1 vote
0 answers
219 views

Is it possible to use an ed25519 security key with Google Chrome SSH applets?

After generating an OpenSSH EC key on a hardware security key: $ ssh-keygen -t ed25519-sk -C comment Is it possible to use this key with Google Chrome SSH applet or Mosh, in particular on non-Linux ...
Petr's user avatar
  • 527
9 votes
1 answer
412 views

How sensitive is the primary key stub of an ed25519 security key (~/.ssh/id_ed25519_sk)?

Now that OpenSSH supports Elliptic curve security keys (since version 8.2), it's possible to generate a ed25519-sk key on a hardware security key: $ ssh-keygen -t ed25519-sk -C comment This generates ...
Petr's user avatar
  • 527
1 vote
1 answer
495 views

SSH to github.com only adds RSA keys - excludes ed25519 host keys

I am doing some tests around ssh. From what I have seen a server usually has multiple host keys. When a client tries to connect, it tries to negotiate which key types to use DSA, RSA, ECDSA, etc. But ...
sergiu reznicencu's user avatar
1 vote
1 answer
347 views

Are there any known SSH (protocol or implementation) vulnerabilities which can be performed on a tor hidden service?

The last couple of weeks I have been researching possible attacks that can be performed on a Tor hidden service using SSH from a location different from that of the server, assuming the .onion address ...
Baldovín Cadena Mejía's user avatar
1 vote
2 answers
1k views

What are possible implications of ignoring the ssh host key warning?

With password authentication you're basically giving your password to the attacker. At least that is my understanding. What about public key authentication? I hear that a private key never leaves your ...
x-yuri's user avatar
  • 277
7 votes
1 answer
28k views

Why are rsa-sha2-512 and rsa-sha2-256 supported but not reported by ssh -Q key?

Running on macOS, I see these available key algorithms: $ ssh -V OpenSSH_8.1p1, LibreSSL 2.7.3 $ ssh -Q key ssh-ed25519 [email protected] ssh-rsa ssh-dss ecdsa-sha2-nistp256 ecdsa-sha2-...
Scott Colby's user avatar
1 vote
1 answer
5k views

OpenSSH AuthorizedPrincipalsFile Allows Any User

I am bewildered as to the below config and subsequent behaviour. /etc/ssh/sshd_config: AuthorizedPrincipalsFile /etc/ssh/principals /etc/ssh/principals: all host.example.com dev This allows me to ...
ephemeric's user avatar
9 votes
1 answer
5k views

How does ed25519-sk actually works?

My google-foo failed me as most "how it works" sections related to fido are very... let's say... consumer-oriented. So openssh supports U2F natively when using the appropriate elliptic-curve-...
Jane's user avatar
  • 93
6 votes
1 answer
2k views

Is getting server host key with ssh-keyscan secure?

I am trying to establish SSH connection to a server through a program. As a pre-requisite to be able to do so, I am getting the publicly available server host key using ssh-keyscan <hostname> ...
c_anirudh's user avatar
  • 163
3 votes
1 answer
2k views

ssh -Q key not listing all key types?

I am having some problems with understanding which types of host keys my SSH daemon actually provides or supports (stock debian buster, sshd 7.9.p1). From the manual (man sshd_config): ...
Binarus's user avatar
  • 587
1 vote
0 answers
146 views

How to interpret received packets, although not being destination host

Set up: Victim: 192.168.0.2 Attacker (also having SSH server installed): 192.168.0.3 SSH server: 192.168.0.4 I perform a successful ARP Spoofing attack (being obviously the attacker's MAC address): ...
LearningSquad's user avatar
-2 votes
2 answers
2k views

Why should we only keep the private key secret, why not the public key? [duplicate]

If I am not wrong, both private key and public key are the same since communication is possible only if both keys are matching. So, why we should only keep the private key secret, why not public key? ...
Sann's user avatar
  • 43
2 votes
2 answers
897 views

ssh-keygen: How to guarantee the uniqueness of serial numbers?

(FYI: I'm using Ubuntu 18.04 Desktop although I don't think my question is platform-dependent.) I read the article Scalable and secure access with SSH and it says: ... if you want to use revocation ...
yaobin's user avatar
  • 171
1 vote
0 answers
44 views

SSH Public Key Authentication Strength Port 22 [duplicate]

Let’s say I have a server with Port 22 opened to the internet , password authentication disabled, and root remote login disabled. Only Key Authentication is enabled. If the key is tightly secured, is ...
Gundam Gundam's user avatar
1 vote
1 answer
1k views

How to convert 64byte openssh-key-v1 to the resulting 32byte ed25519 private key

I wrote an openssh-key-v1 Protocol reader and extracted all fields according to the format definition: "openssh-key-v1"0x00 # NULL-terminated "Auth Magic" string 32-bit length,...
Richard Burkhardt's user avatar