Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [openssh]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
32 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 ...
user avatar
  • 113
0 votes
3 answers
283 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 ...
user avatar
1 vote
1 answer
96 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 ...
user avatar
  • 119
0 votes
3 answers
156 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 ...
user avatar
1 vote
1 answer
37 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-Helman. I've generated a 4096-bit moduli file with ssh-keygen -G -b 4096, and ...
user avatar
0 votes
0 answers
45 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 ...
user avatar
  • 101
1 vote
0 answers
54 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 ...
user avatar
  • 475
4 votes
0 answers
79 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 ...
user avatar
  • 475
1 vote
1 answer
78 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 ...
user avatar
1 vote
1 answer
100 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 ...
user avatar
1 vote
2 answers
329 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 ...
user avatar
  • 257
0 votes
0 answers
18 views

Bypass time limitation of OpenSSH when using Nmap [duplicate]

Terminal command: $ nmap 10.10.244.76 -p 22 --script ssh-brute \ --script-args userdb=trash.txt,passdb=rockyou.list,timeout=4s NSE: [ssh-brute] usernames: Time limit 15m00s exceeded. NSE: [ssh-...
user avatar
2 votes
1 answer
4k 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 ssh-ed25519-cert-v01@openssh.com ssh-rsa ssh-dss ecdsa-sha2-nistp256 ecdsa-sha2-...
user avatar
1 vote
1 answer
561 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 ...
user avatar
3 votes
1 answer
982 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-...
user avatar
  • 33
0 votes
0 answers
94 views

OpenSSH authorized_keys options for securely tunneling to a database

I would like to allow people to tunnel to either db1.example.net or db2.example.net based on their SSH public keys via a bastion server bastion.example.net. What SSHD options should I add to the ~/....
user avatar
3 votes
1 answer
415 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> ...
user avatar
  • 133
3 votes
1 answer
429 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): ...
user avatar
  • 547
1 vote
0 answers
98 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): ...
user avatar
-2 votes
2 answers
552 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? ...
user avatar
  • 33
2 votes
1 answer
233 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 ...
user avatar
  • 121
1 vote
0 answers
41 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 ...
user avatar
1 vote
1 answer
457 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,...
user avatar
0 votes
1 answer
606 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 ...
user avatar
1 vote
1 answer
138 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 ...
user avatar
  • 145
0 votes
0 answers
54 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 ...
user avatar
  • 101
0 votes
1 answer
283 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 ...
user avatar
4 votes
2 answers
1k 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 ...
user avatar
  • 43
3 votes
0 answers
621 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 ...
user avatar
1 vote
2 answers
1k 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 aes256-gcm@openssh.com as opposed to aes256-...
user avatar
  • 113
1 vote
0 answers
90 views

Risk of committing IdentityFile name for OpenSSH configuration to public repository

What is the risk of committing the IdentityFile line for each of my Host entries in my ~/.ssh/config to my public dotfiles repository? Would providing such information make it any easier for an ...
user avatar
  • 290
4 votes
0 answers
402 views

Benefit of using OpenSSH FIDO/U2F support over GPG mode?

OpenSSH version 8.2 introduced support for FIDO/U2F hardware authenticators, via the new public key types "ecdsa-sk" and "ed25519-sk". I currently have SSH authentication set up in combination with ...
user avatar
  • 141
18 votes
1 answer
9k views

OpenSSH declares ssh-rsa deprecated. What do I do next?

With the 8.2 release of OpenSSH, they have declared that ssh-rsa for SHA-1 will soon be removed from the defaults: Future deprecation notice It is now possible[1] to perform chosen-prefix ...
user avatar
  • 2,391
0 votes
0 answers
2k views

Interpreting SSH information on Windows Event Viewer.... sshd: Did not receive identification string from ipaddress on port portnumber

I am currently reading through Windows Event Log (OpenSSH) looking at the artefacts created by an attack, I am trying to understand the meaning of certain notifications. A brute force attack was ...
user avatar
  • 73
10 votes
1 answer
1k views

Does it weaken the encryption of SSH to use compression?

When using compression on openssh (a la ssh -C ...), does this reduce entropy and make the tunnel traffic more vulnerable to cryptanalysis? Is compression an option I should disable server-side for ...
user avatar
1 vote
1 answer
185 views

SSH and the ECDH component

With SSH, most of my servers use ed25519 (the twisted Edwards variant EC) for authentication. I was wondering, after authentication with ed25519, does SSH protocol 2 simple use ephemeral/ephemeral ...
user avatar
  • 689
5 votes
2 answers
3k views

How to accept only user identity keys of type ed25519 on OpenSSH Linux server?

I want to force all users to use only ed25519 type keys when logging in via SSH / SFTP to a Linux server which is running a recent version* of OpenSSH. Some general reasons for putting controls on SSH ...
user avatar
  • 320
6 votes
2 answers
512 views

Does `ssh-keyscan` verify the legitimacy of the host(s) it scans?

There are tutorials on the web, such as this one: https://blog.oddbit.com/post/2019-02-24-docker-build-learns-about-secr/ They show you sample code to run ssh-keyscan in an automated manner so that ...
user avatar
  • 247
0 votes
2 answers
415 views

changing defaults when generating new SSH server keys

On Debian, I can generate new SSH server keys: rm /etc/ssh/ssh_host_* dpkg-reconfigure openssh-server but that will generate the keys with default values, ie 2048 RSA key. What is happening under ...
user avatar
0 votes
0 answers
157 views

SSH (ssh_auth_list) authentication failing from windows to linux

Bit new in ssh and have an issue in understanding. I got a code which uses ssh_auth_list routine as below. method = ssh_auth_list(session); printf(" %d " , method); I am using a ssh library and when ...
user avatar
6 votes
2 answers
8k views

Convert ECDSA keys (PEM, OpenSSH)

To work with ECDSA keys I am using the python-ecdsa library. Unfortunately this library can not process keyfiles properly if they are provided in the OpenSSH format. Instead I generate them in the PEM ...
user avatar
  • 161
3 votes
1 answer
158 views

Exposure of /etc/ssh, risks?

I accidentally exposed the keys in /etc/ssh What is the risk? I think it will allow someone to impersonate the server and conduct MITM. Will it let someone SSH into the server? I think not because ...
user avatar
0 votes
0 answers
127 views

Sufficient to only require 2FA for su elevation?

I have a small web-facing server on my home network. It is headless, and the only way to log in is to ssh with pubkey authentication from within the local network. I wanted to turn on a 2FA ...
user avatar
0 votes
1 answer
482 views

Bruteforcing via port 88 on MacOS

Macos has open port 88 by default. Is it possible to check validity of the password via this port from Linux and how? If the vncserver is active, it is possible to know also the username (by ...
user avatar
2 votes
2 answers
698 views

Can a SSH jump host act as MITM?

Let's say, for example, a company has a "centralised" SSH bastion/jump host on an untrusted server (e.g. a virtual machine in "the cloud"). Meanwhile the corporate/customer/whatever network(s) have ...
user avatar
4 votes
1 answer
314 views

How were attackers able to login to the Apache Foundation's infrastructure over ssh with passwords? (2010)

SSH passwords should not have been enabled for login over the Internet. Although the Infrastructure Team had attempted to configure the sshd daemon to disable password-based logins, having UsePAM yes ...
user avatar
  • 31.8k
1 vote
1 answer
2k views

Loading a passphrase-protected private SSH key from a file with the cryptography Python module

I am trying to load a passphrase-protected private SSH key from a file using the cryptography Python module. However, I'm not exactly sure how to proceed. The following yields a Crypto.Util.Padding....
user avatar
1 vote
1 answer
2k views

How do I determine if an existing SSH private key is secure?

For an ordinary user, how would I verify that a private key file was generated using reasonably secure algorithms? In response to things like allegedly insecure ssh-keygen defaults.
user avatar
  • 2,961
1 vote
2 answers
187 views

Possible to get sshd (openssh) to log the public key of failed key based login attempts?

As I understand sshd (openssh in my case) typically does/may log the fingerprint/hash of the public key of incoming connections which are attempting to authenticate via key. What I'm looking for is ...
user avatar
  • 291
2 votes
0 answers
140 views

Could a running SSH server somehow fool connected SSH client to create a reverse port forward?

Let's be extra paranoid and assume that the SSH server my client is connected to, was "enhanced" so that every SSH client that establishes an connection with it, will be tricked into thinking that it ...
user avatar
  • 121