Questions tagged [openssh]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
86 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
150 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
0 answers
24 views

Securing SSH reverse proxy from app in an untrusted environment to server

I'm adding a feature to my web app that will allow remote configuration of various devices via their built-in web apps. For forwarding the HTTP traffic from my web app to the remote device I'm ...
  • 101
0 votes
1 answer
115 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 ...
0 votes
1 answer
37 views

REMOTE HOST IDENTIFICATION HAS CHANGED: sftp -v -o HostKeyAlgorithms=... : Cannot use "ecdsa" and "rsa" in parallel

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
702 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 ...
  • 141
1 vote
1 answer
153 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 ...
  • 113
0 votes
3 answers
561 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
99 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 ...
  • 119
0 votes
3 answers
228 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
62 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 -...
1 vote
0 answers
78 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 ...
  • 111
1 vote
0 answers
78 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 ...
  • 495
6 votes
0 answers
110 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 ...
  • 495
1 vote
1 answer
119 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
118 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
384 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 ...
  • 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-...
5 votes
1 answer
7k 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-...
1 vote
1 answer
969 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 ...
3 votes
1 answer
2k 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-...
  • 33
3 votes
1 answer
521 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> ...
  • 133
3 votes
1 answer
556 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): ...
  • 557
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): ...
-2 votes
2 answers
738 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? ...
  • 33
2 votes
1 answer
300 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 ...
  • 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 ...
1 vote
1 answer
546 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,...
0 votes
1 answer
770 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
145 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 ...
  • 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 ...
  • 101
0 votes
1 answer
308 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 ...
  • 121
4 votes
3 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 ...
  • 43
3 votes
0 answers
707 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 ...
1 vote
2 answers
2k 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-...
  • 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 ...
  • 290
4 votes
0 answers
430 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 ...
  • 141
18 votes
2 answers
12k 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 ...
  • 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 ...
  • 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 ...
1 vote
1 answer
233 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 ...
  • 679
6 votes
2 answers
4k 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 ...
  • 340
6 votes
2 answers
560 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 ...
  • 247
0 votes
2 answers
512 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 ...
0 votes
0 answers
160 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 ...
6 votes
2 answers
9k 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 ...
  • 161
3 votes
1 answer
159 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 ...
0 votes
0 answers
134 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 ...
0 votes
1 answer
536 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 ...
2 votes
2 answers
771 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 ...