Questions tagged [ssh]

SSH (Secure shell) is a protocol for secure communication between computers to execute remote commands, transfer data and tunnel TCP connections.

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

ssh tunnel: listening on the ssh server [migrated]

Here is what I am trying to do: ssh me@server1 4000:server2:4000 With this command, I can connect to server2:4000 by connecting to localhost:4000 What I want to do is to connect on server1:4000 Is ...
  • 29
1 vote
2 answers
105 views

Why is cert for localhost not trusted when using ssh tunnel?

I've created a developer cert with my companies CA for my development box. The CN is the FQDN of my development box mybox.example.com, but I've also added subjectAlternative names that include ...
  • 121
1 vote
2 answers
105 views

Risks and recommendations of using passwordless sudo

Given that I'm the only human who should have access to a Linux server, what are the major security risks associated with updating sudo to not require a password for my local user? Are there other ...
2 votes
1 answer
84 views

Is it possible for a hostname lookup to be temporarily lying (wrong ISP)?

In 2017, I was running a local website on my own dedicated server in a professional data center. FreeBSD. Installed by me remotely. Maintained carefully by me. No other human users than myself. I was ...
  • 21
1 vote
2 answers
106 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 ...
  • 2,695
0 votes
1 answer
98 views

Best way to connect to user SSH servers

I have a project that calls users' SSH servers to do some tasks. For now, I am storing users' passwords at my service as hashed (Username, hashed password and salt), but the SSH password (username, ...
  • 5
0 votes
1 answer
93 views

Securely SSH a server from an intermediary remote machine (possibly with Yubikey)

I am doing remote devevelop on a remote dev machine. From the remote machine, I need to SSH to other servers and services like the Github. Everything is on the Internet. My desktop is much more secure ...
0 votes
2 answers
38 views

Securely access server via FTP through SSH tunnel

Is it right to assume, that when i build up a tunnel with ssh -D from outside my LAN and then access my only locally exposed server via FTP, it can be called 'safe'? Tunnel is established on the same ...
1 vote
0 answers
30 views

SSH server disconnecting when valid auth request is provided and responding with seemingly invalid SSH_MSG_USERAUTH_PK_OK

I use the net-ssh ruby library to connect to various servers. Around 2 months ago, a large subset of the servers we connect to stopped working, these servers belong to several major banks. We're ...
1 vote
0 answers
198 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 ...
-2 votes
2 answers
251 views

What can i do with the ssh host key i got from this nmap scan. (Hack the box) [duplicate]

I am on hack the box and I ran nmap -A IP_address and this is the output I received. I am wondering if I can do something with the ssh hostkey.
0 votes
1 answer
125 views

SSH over HTTPS or Directly open Non Standard port

We have a situation where we have an architecture that calls for a Web based UI for querying some data and the data input is through rsync over SSH. I think it would be easier to manage and more ...
1 vote
0 answers
66 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 ...
1 vote
0 answers
93 views

What would be the security rationale for a hotel blocking only SSH traffic? [closed]

I recently stayed at a hotel where outbound SSH traffic (and seemingly only SSH traffic) was blocked on the guest WiFi network, and I'm trying to figure out what security-based rationale they might ...
8 votes
3 answers
4k views

Can an SSH server in password mode be impersonated if I ignore the fingerprint warning?

Assume that I never check the server fingerprint when logging in to an SSH server. This means that certain configurations of SSH can be impersonated. For example, I can log into a server that only has ...
2 votes
1 answer
74 views

FTPS with IP restriction OR SFT over SSH without IP restriction - which one is more secure?

Im able to connect to my managed Linux Ubuntu Server only through FTP using explicit SSL (Auth TLS) with IP restriction and SFT over SSH without IP restriction Question: which method is more secure to ...
4 votes
1 answer
677 views

Is brute force for SSH similar to cracking WPA2 handshake?

I heard recently that WPA2 passwords can be brute forced if somebody captures handshake (which is not very difficult). Can somebody tell if a similar method exists for cracking SSH traffic? I mean ...
0 votes
0 answers
52 views

Unauthorized firewall rules on SSH bastion servers

Yesterday I found that a few firewall rules (iptables on Ubuntu 20.04 OS) have been added to an SSH bastion server that allow SSH access on a custom SSH port number. All IPs are from Vietnam. AFAIK ...
1 vote
0 answers
72 views

Going about sharing 2FA key between multiple login methods on a Synology NAS + browser & SSH authentication

I've recently acquired a Synology server (DS720+) and have it accessible outside my LAN via a VPN. I have 2FA on for logins to the server via the web portal, but I have found many use cases for ...
  • 11
0 votes
1 answer
44 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 ...
4 votes
1 answer
127 views

Why should I re-generate a server's SSH host keys?

This server hardening guide suggests re-generating the RSA and ED25519 host keys. What is the advantage of re-generating the default key?
2 votes
1 answer
83 views

Why should I disable insecure SSH hostkeys if I never plan on using them?

A number of articles suggest removing insecure (broken) SSH key types in order to have a more secure server. In practice, if I only connect to the server with secure key types, why should I bother ...
1 vote
1 answer
88 views

In this Facebook article, how do they prevent the engineers from copying SSH certificates from bastion hosts to personal laptops?

These days I'm reading this Facebook engineering article Scalable and secure access with SSH. Most of the article makes sense to me but I am not experienced enough to understand the paragraph about ...
  • 141
1 vote
0 answers
173 views

Given a Java ECPublicKey ECDSA PublicKey, how can I build an SSH2 public key? [closed]

I have created a ECDSA key and now need to convert this to SSH2 key. final KeyPairGenerator keyGen = KeyPairGenerator.getInstance("ECDSA"); ECGenParameterSpec params = new ...
  • 11
2 votes
1 answer
575 views

Does a SSH pubkey or private key contain the key comment?

I know that a ssh id_something.pub key by default contains a comment user@host for where it was created. But is it also contained in the key itself? On one host it seems that ssh -vv somehow got the ...
  • 3,325
3 votes
2 answers
205 views

Is it safe to use an untrusted server for an SSH jump?

The question is a thought experiment. Junior works in IT at Finsurance Corporation™. He works from home now, and has to VPN into work but hates it because they've blocked Gmail and Reddit. Junior ...
  • 203
0 votes
1 answer
125 views

Deploy to Digital Ocean droplet from Github Action - Should I leave the SSH port open for future deployments?

I'm going to a deploy a web app (angular static frontend and node backend in docker) to digital ocean droplet. Deployment is done from Github Action by essentially loging via SSH to the droplet and ...
1 vote
0 answers
57 views

Is "pam_ssh_agent_auth" more secure than passwords for sudo on a remote server?

I read about "pam_ssh_agent_auth" in combination with sudo, which can use a ssh agent to authenticate instead of using the users password: https://manpages.ubuntu.com/manpages/jammy/en/man8/...
1 vote
1 answer
301 views

ed25519-sk vs. gpg-agent on Yubikey

According to my understanding of this document, Yubikey is capable of running ed25519-sk and gpg-agent. Which one is more secure? Obviously, ed25519-sk wouldn't work, if the SSH server is old, but ...
0 votes
1 answer
63 views

Ubuntu vs. Debian SSH public key login

In the Debian 9 server I have, these are the least restrictive permissions I can set for SSH login with public key to work: /home/user 775 /home/user/.ssh ...
  • 101
0 votes
1 answer
46 views

ProxyCommand implemented in which OpenSSH Version

Scenario: You as a pentester are in a situation where you want to do multi hopping to jump over several ssh servers to your target. The systems are somehow outdated so you want to check what you can ...
1 vote
1 answer
124 views

X11 forwarding to another user. How it's possible?

I would like to understand how the following problem is technically possible: In my company, we have a machine which I and several colleagues connect to. I regularly use x11 forwarding when I connect ...
0 votes
1 answer
618 views

What are the security implications of using GPG instead of SSH keys for authentication

I want to use a GPG key instead of an SSH key. Looking online I found several guides on how to do it. But these guides are about using GPG for convenience. I instead want to know the pros and cons ...
1 vote
1 answer
99 views

What scenarios does calling `clear` at the end of an ssh session protect against?

I have noticed that some server configurations put a clear command in the default ~/.bash_logout file, also with the comment "Clear the screen for security's sake". I can see that this ...
  • 653
0 votes
0 answers
53 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
1 vote
2 answers
109 views

What ways other than password and authorized SSH key are there to log in to a Linux system?

When deleting a user on a Linux system, if you lock their password and kill all their processes, a logged in user disconnects and can't log in with his password anymore. But if they still have an ...
  • 11
0 votes
0 answers
27 views

SSH to a public account which is forced to run a PHP script. What additional security measures do I need to take?

I have an Ubuntu server with a user "demo". The user has been setup to run a php script on login with usermod demo -s /path/to/php/script.php. The password for the demo account will be ...
3 votes
2 answers
181 views

Is it secure for a platform to use the same private key for multiple clients' SSH connections?

https://nexla.zendesk.com/hc/en-us/articles/360053720333-Database-Connection-Options Specifically: In a text editor, add the below public SSH key to the authorized_keys file. The key must be all on ...
  • 356
0 votes
4 answers
244 views

Benefits of non-standard SSH port when password authentication is turned off

Is there any benefit of using a non-standard SSH port when PasswordAuthentication is turned off in sshd? The only benefit of non-standard SSH ports I know of is a reduction of the amount of brute ...
  • 101
0 votes
0 answers
11 views

What happens internally when I login using SSH and public/private keys? [duplicate]

I'm familiar with the operation of public/private keys, however I was wondering how is the SSH protocol using them internally (from a desktop to a distant server for instance) is using it). When I try ...
5 votes
1 answer
2k views

PAT vs. SSH - Why Bother with SSH?

Are there any advantages to using SSH keys vs. a PAT when interacting with a site like Github? Github claims SSH keys are a way to not have to enter your username + password (personal access token) ...
  • 172
0 votes
1 answer
91 views

Trying to understand port tunnelling

I'm trying to get a better understanding of the technique of SSH tunnels. I have Nessus running within a Kali machine inside my environment and would like to access this a service via the browser on ...
3 votes
1 answer
256 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
166 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-...
0 votes
0 answers
74 views

Safest way to access a service without directly using a VPN

I'm not sure if this site is the best option to be asking it, but could not find a better fit. Imagine I have some services (SSH and RDP, mainly) exposed on my personal desktop, running at my home. ...
0 votes
2 answers
1k views

Fastest way to brute force SSH

I'm doing a CTF on vulnhub and I need to brute force SSH. I've got 6 usernames and 15.000.000 passwords to try so I'm brute-forcing with hydra by running hydra -L users.txt -P $LIST/rockyou.txt -t 64 -...
4 votes
1 answer
900 views

SSH Man in the middle attacks - how to detect if the victim is allowed to login on a remote server and which method is used

There are some man in the middle tools for ssh, which can be used to intercept ssh sessions: SSH-MITM project OpenSSH fork with implemented mitm capabilities The OpenSSH fork has some problems with ...
2 votes
1 answer
300 views

Managing multiple GPG keys

I'm currently attempting to setup my personal GPG key suite for the next few years, and I'm running into a question I don't have a ready answer for. I own 3 yubikeys, Primary/Secondary/Offsite Backup. ...
  • 121
0 votes
1 answer
124 views

I suspect someone entered my server via SSH after I created a pem file for the SSH access key. What I can learned about it?

I created an id_rsa key in my server with ssh-keygen -b 4096 without a passphrase. I added my id_rsa.pub into .ssh/authorized_keys and downloaded my private id_rsa key into local PC and changed it ...
1 vote
1 answer
386 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

1
2 3 4 5
24