Questions tagged [openssh]
A free and open implementation of the SSH communication security tools.
172
questions
0
votes
0
answers
23
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 ...
1
vote
2
answers
300
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?
0
votes
1
answer
65
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 ...
0
votes
2
answers
668
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-...
0
votes
1
answer
564
views
Configuration option PubkeyAcceptedKeyTypes vs PubkeyAcceptedAlgorithms?
I'm using OpenSSH 8.9. 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 ~/....
5
votes
1
answer
3k
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 ...
1
vote
0
answers
390
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 ...
3
votes
1
answer
260
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 ...
2
votes
0
answers
97
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 ...
0
votes
3
answers
392
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-...
3
votes
2
answers
608
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 ...
19
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?...
7
votes
3
answers
5k
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 ...
1
vote
0
answers
661
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 ...
1
vote
0
answers
237
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 ...
0
votes
1
answer
75
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 ...
0
votes
1
answer
375
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 ...
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 ...
2
votes
2
answers
4k
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
...
0
votes
1
answer
565
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 ...
1
vote
2
answers
453
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-...
3
votes
1
answer
2k
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 ...
2
votes
1
answer
812
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 ...
0
votes
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
...
1
vote
1
answer
122
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 ...
0
votes
3
answers
839
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 ...
2
votes
1
answer
194
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 -...
2
votes
0
answers
254
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 ...
1
vote
0
answers
166
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 ...
8
votes
1
answer
296
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 ...
1
vote
1
answer
383
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 ...
1
vote
1
answer
256
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 ...
1
vote
2
answers
939
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 ...
7
votes
1
answer
21k
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-...
1
vote
1
answer
3k
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 ...
8
votes
1
answer
4k
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-...
5
votes
1
answer
1k
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> ...
3
votes
1
answer
1k
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):
...
1
vote
0
answers
115
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):
...
-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? ...
2
votes
2
answers
668
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 ...
1
vote
0
answers
43
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 ...
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,...
1
vote
1
answer
1k
views
How hacker/ others get your SSH private key / stole your SSH private key?
I know we must keep private keys secure, but as long as we don't share the private key, what can go wrong?
How hackers/others can steal/get your private key?
What is the possible way that can happen ...
1
vote
1
answer
201
views
Efficiently handling malicious, single connection attempts to a server?
I wanted to know what efficient way is there to handle malicious attempts to connect to my server by single IPs. The attempts show up logged in /var/log/auth.log as Connection closed by IPaddress port ...
0
votes
0
answers
55
views
OpenSSH artifacts, remote system access? [duplicate]
After stumbling upon some unknown folders in my unused OneDrive (posted question), I did some digging arround and found some interesting logs. Apparently, OpenSSH had been used for remote access on my ...
0
votes
1
answer
396
views
Recommendations on minimal alternatives to openssh [closed]
Although openssh is awesome, I'm interested in exploring some more lightweight FLOSS alternatives to use for connecting to servers I'm administrating (and using alone). Since I only need a minimal ...
5
votes
3
answers
3k
views
How does the weakness of SHA-1 introduce attack vectors in SSH?
The security branch of my company worries that the use of older versions of OpenSSH (pre-7.4), where the only Key Exchange Algorithm available is SHA-1 is a major security issue. They suggest ...
3
votes
0
answers
961
views
GPG Agent SSH Forward Pinentry
I have GPG agent forwarding via SSH RemoteForward working up to a point.
I can list my private and public keys on the remote host.
If I try to decrypt a file remotely, the PIN is prompted for but the ...
2
votes
2
answers
3k
views
OpenSSH: Meaning of cipher with email address @openssh.com
When using OpenSSH server (sshd) we specify allowed ciphers, host key algorithms and MACs. Some of those ciphers have an email address appended, for example [email protected] as opposed to aes256-...