Questions tagged [ssh]
Secure Shell (SSH) is a protocol primarily for encrypted shell connections. This tag is also used for questions about sshd and openssh, the two standard applications for using SSH.
8,974
questions
0
votes
0
answers
77
views
server ask for root password after reboot while logging in with ssh key
after rebooting Linux server (centos 7) I'm trying to login with ssh key seems it's successfully loging in but asks to change root password which I've forgotten. Is there a way to bypass changing root ...
35
votes
4
answers
55k
views
Configuration for multiple port SSH
I need to listen to SSH on two ports: 22 for hosting admin access and 26 for regular access. I would like to disallow root login on 26 and disallow all but internal IPs for port 22. The latter can be ...
6
votes
1
answer
2k
views
What's the largest string OpenSSH can expand from a % token?
Instead of a traditional authorized_keys file on my server, I'm using a custom key verifier which sshd calls via the AuthorizedKeysCommand option. In the sshd_config, I can specify that this command ...
9
votes
3
answers
780
views
Prevent SSH attacks
I'm trying to setup iptables rules to only allow 3 attempts by an IP per minute to connect to the servir via SSH, and drop all the connections after to prevent SSH attacks; but it seems i'm doing ...
0
votes
0
answers
220
views
File transfers very slow in one direction
I am having trouble debugging a connection issue :
Server A (OMV) has a fast internet connection : 900mbps down / 600 mbps up
Client B (Windows 10 using wsl) has a decent internet connection : ...
1
vote
0
answers
192
views
Server host key changing frequently
Im trying to connect to my ubuntu server via ssh from Windows. Unlike my another ubuntu server from same dedicated server hosting, the server host key changing frequently.
I get WARNING: REMOTE HOST ...
0
votes
1
answer
135
views
SSH Permission denied (publickey) fails on Ubuntu but succeeds on MacOS
I have two machines, a MacOS and an Ubuntu. I have been working sucessfully on the MacOS, i.e. I can use my public key to connect via SSH to a server. However, when trying to use the same private &...
0
votes
1
answer
462
views
How to fix a corrupt server (after upgrade) with chroot in rescue-mode over ssh
First, I'm NOT trying to create a ssh-jail.
Here's the situation
I decided to upgrade my server from Debian 9 to 12. But now I'm locked out.
I went step by step : from 9 to 10, 10 to 11 and 11 to 12, ...
11
votes
5
answers
69k
views
Failing to connect to server via SSH - "Server refused to allocate pty"
I have a STRATO V-PowerServer running with Ubuntu 10.10 for my stuff but lately have problems connection to the server via ssh.
Basically all I have is ssh-access to the server and if necessary I can ...
92
votes
18
answers
124k
views
Ansible stuck on gathering facts
I'm having some odd issues with my ansible box(vagrant).
Everything worked yesterday and my playbook worked fine.
Today, ansible hangs on "gathering facts"?
Here is the verbose output:
<5.xxx....
84
votes
16
answers
697k
views
What causes SSH error: kex_exchange_identification: Connection closed by remote host?
I setup a SSH server online that is publicly accessible by anyone. Therefore, I get a lot of connections from IPs all over the world. Weirdly, none actually try to authenticate to open a session.
I ...
0
votes
1
answer
157
views
ssh to an IP without any local ssh multiplexing/control master
I have configured my ssh (on Linux) to use SSH multiplexing & control master. It's great and speeds things up.
But now I want to test a load balancer. How can I ssh to an IP address and not use ...
4
votes
3
answers
6k
views
Remotely use root over ssh for unison
I'm a little confused on how to run unison to sync files with group and owner attributes on an ubuntu system, as you need to be root. But I need to do this remotely and automated. I know I can set up ...
0
votes
1
answer
945
views
SSH public key authentication with Powershell
I'm trying to create a SSH connection between my personal laptop running with Windows 11 and Powershell 7.3.9 and
my VPS running on Debian 12 (bookworm). I'm not using Putty on purpose.
I first wanted ...
0
votes
0
answers
253
views
SSH and SCP not working
I know that this is not really a server error, but I have been having troubles connecting to my servers via SSH.
To be perfectly clear, I have verified that the servers' SSH server works properly. I'...
2
votes
3
answers
9k
views
SSH/SFTP Reverse Proxy
I have two machines accessible on the Internet with no NAT involved. Both machines run an SSH service.
I want to connect via SSH/SFTP to Server A on Port 2000 and this connection should be routed to ...
8
votes
3
answers
3k
views
Redirect ssh trafic for one user through another port
Is it possible to have a configuration like this:
A server which listen ssh connections on port 22 as usual
For one user (let's say git) redirect all the traffic through another port (2222 for ...
0
votes
1
answer
415
views
ProxyJump asks for the same password twice
For my work, I have to connect to a remote server. The connection is via a simple SSH and with only one password (no authentication file is needed).
For more clarity, I connect like this:
Do ssh user@...
5
votes
6
answers
40k
views
Google Cloud Services - unable to SSH into instance at all
I am unable to SSH into my instance on the Google Cloud Services.
I am not very well versed in VM management and troubleshooting, but have tried everything I knew, and google could provide to me ...
1
vote
0
answers
85
views
How can I setup 2 VPS can connect without using VPN which those VPS has already setup the ListenAddress to the VPN
I have 2 VPS,
and those 2 VPS are setup OpenVPN, and we only can access it by connect to VPN, then ssh it to VPN gateway itself. I set it up from sshd_config by adding ListenAddress.
here's the ...
1
vote
2
answers
4k
views
SSH connection issue : How to change folder / file permissions in Windows similarly to Linux?
I have hard times connecting my local PC through SSH to another remote PC. I set the public key on both machines in the authorized_keys folder following this tutorial : https://help.ubuntu.com/...
0
votes
1
answer
112
views
How to use gnome-keyring in virt-manager / remote-viewer for decrypting an encrypted SSH key?
I use virt-manager to connect to a remote KVM/libvirt hypervisor over SSH. After connecting to the server, I can interact with machines just like if they were on my local computer (under the hood, ...
1
vote
1
answer
398
views
How do I generate an SSHFP record from a remote ssh server (like a router)?
How do I generate an SSHFP DNS records for a server like a router that does not give you direct access to their keys in a format that ssh-keygen -r machine understands?
The ssh-keygen -r machine reads ...
0
votes
0
answers
190
views
How to restrict ssh access only to users within multiple groups?
I would like to know how to allow ssh access to users who are in multiple groups. For example, in general, if the user is part of the group shell then they may access a number of servers. However, I ...
0
votes
1
answer
3k
views
sss_ssh_authorizedkeys returns error code 13 when called from sshd
I'm using a FreeIPA server configured with SSH keys added to users. I am trying to get servers to authenticate using the ssh keys from the IPA server, so I don't have to manage as many ...
1
vote
4
answers
17k
views
ssh into EC2 instance asks for password despite using a pem file
I downloaded the pem file on my Windows machine and I am able to connect to my instance with the puttygen generated ppk file (which has a public and a private key in it).
I copied the pem file over ...
0
votes
0
answers
78
views
SSH connection to the GIT through a jump server with stdin/stdout forwarding
SSH connection to the GIT through a jump server with stdin/stdout forwardingI'm trying to establish a connection from client server (A) to the remote server (C) using an intermediate jump server (B), ...
10
votes
1
answer
2k
views
SSHFP not working
I have two machines running OpenBSD v6.9.
Let's be original and call them client and server.
I generated the SSHFP records on the server with :
ssh-keygen -r host.domain.tld
In the DNS zone, I added ...
1
vote
1
answer
330
views
FreeIPA SSH keys not working with Ubuntu
I have FreeIPA setup and its working fine so far with Centos7, Rocky8 and Rocky 9 machines. Users can SSH into machines using their SSH keys.
Yesterday I added a Ubuntu machine and it wont let me SSH ...
11
votes
1
answer
2k
views
How does the SSH option CheckHostIP=yes really help me?
There are many discussions about this option and most people argue that "it improves security", "it protects you from MiTM attacks/DNS spoofing", etc., but I fail to see how that ...
144
votes
4
answers
6k
views
Is my password compromised because I forgot to hit Enter after ssh username?
I've just tried logging into a Fedora (release 13 Goddard) server using SSH (PuTTY, Windows). For some reason the Enter after typing my username didn't go through and I typed in my password and hit ...
2
votes
7
answers
9k
views
Unable to log into Linux server after resetting root password
Today i reset the password for root user. After i connect via ssh. While reset the password, i exactly typed the which is in my notepad. Immediately after that, when i try to connect the ssh again ...
0
votes
0
answers
47
views
Custom Linux AMI: How does AWS know where to install account SSH .PEM files when an AMI is provisioned?
We are building a custom AMI from a template EC2 EBS instance snapshot (Oracle Linux 8). This page shows there are many different user names depending on the AMI you choose:
https://docs.aws.amazon....
0
votes
0
answers
97
views
Error connecting with ssh - external network
I know it's a very discussed topic, but after following lots of tutorials and checking most common troubleshooting problems, I'm facing the following situation
We have a small server in the office ...
2
votes
2
answers
21k
views
How to configure PAM to authenticate SSH logins with (password & OTP) or (public key & OTP)
My goal is to develop an ansible playbook to deploy multifactor ssh logins of the type (public key and OTP) or (password and OTP) on Ubuntu Server 18.04 hosts.
I followed the guide here and it ...
1
vote
1
answer
6k
views
Ssh login error - Permission denied (publickey,password)
i just had configured a debian server and installed aapanel on it. I also changed the default port to 50001 instead of 22.
now i tried to login with ssh -p 50001 [email protected] and got this error
...
1
vote
0
answers
82
views
ssh_config capture group (or similar)
I like to namespace (simple prefix) remote servers that share a common network disposition or other logical access/grouping.
Is there a way to reference the contents of the wildcard (capture group or ...
2
votes
3
answers
13k
views
Non-interactive SSH connection fails - error: can't open /dev/tty: No such device or address; Host key verification failed
Below you can see the log.
The connection is from a Cygwin SSH client to a Cygwin SSHD server.
The connection works ok when launched from the command line but fails when launched from Jenkins (Java ...
0
votes
1
answer
689
views
Changing the root folder of the ssh server
There are some similar questions but not same. I don't want to change the default folder. so i want to set the ROOT FOLDER for ssh connection. I mean the only folder that the client has access to , is ...
0
votes
1
answer
1k
views
RHEL 8 Ansible playbooks not working with FIPS enabled
I have two sets of Linux VMs in a GCP (Google cloud) environment: Debian9 and RHEL8. The RHEL8 environment is FIPS-140 enabled, due to security/compliance requirements. None of our Ansible playbooks ...
0
votes
0
answers
34
views
Feeding config into SSH via pipe
I need to make individual ssh connection configuration dynamic. Ideally it should work as follows:
#!/usr/bin/env bash
ssh -F <(config_provider_command) hostname
Many Linux and GNU commands would ...
0
votes
1
answer
127
views
How to redirect ssh port to another port by username?
I have sshd: Listen 2222 on server, and what I want to do is:
ssh -p 2222 userA@ip, and server finds userA, then redirects this connect to 6122 port of this server, but I don't want to modify on my ...
1
vote
0
answers
174
views
SSH connection slow after authentication
I have a few servers where SSH'ing into them can take a minute or so before I get a prompt. I connected with ssh -vvv and it hangs after authentication succeeds, so it's none of the usual stuff (...
0
votes
0
answers
418
views
Firewalld: restrict ssh access to specific IP and allow that IP to access services in the interface zone
The target setup is the following: I want to restrict ssh access to the server to a specific IP, and allow the http service to all. Now, to start from "scratch" I defined a new zone which I ...
1
vote
1
answer
153
views
Remote Linux server GitHub permission denied publickey issues
I am experiencing publickey permission issues when trying to pull a private repo from GitHub to a remote Linux server.
Update
Ran ssh -v -o IdentitiesOnly=yes -i ~/.ssh/id_rsa [email protected] command ...
-1
votes
2
answers
2k
views
Unable to SSH into server when using passwordless SSH keys
This is probably an idiotic question, but I'll try and provide as much information as possible. If you need any extra details, then please let me know.
I have a Mac running Ventura and an AlmaLinux ...
0
votes
0
answers
106
views
ssh to the same server of openvpn, tries to connect with original IP instead of VPN IP
I'm using ubuntu Linux 22.04.3 LTS with OpenVPN 2.5.5 and i have ssh server installed there too.
i want people to be able to connect to that server by ssh only if they are connected to the VPN.
that ...
0
votes
0
answers
176
views
Should I run as a docker user, and keep sshd running all the time, or as root but start/stop sshd on demand
I'm creating a docker container that will be used as a reverse tunnel. I'm now looking to harden the solution but I've an interesting dilemma and I'm not sure what the best approach is.
Current the ...
0
votes
3
answers
13k
views
I keep getting OpenSSL Header Version not found error when compiling OpenSSH Debian Squeeze
I built Openssl1.0.0d ./config shared no-threads zlib
It installed fine to the default /usr/local/ssl
I went and downloaded OpenSSH 5.8p2 and ran ./configure
but now it keeps giving me a Openssl ...
0
votes
1
answer
255
views
powershell detect login is sftp
tl;dr in powershell, how can I detect a login is specifically SFTP and not SSH or local?
On Windows 10 I have the built-in OpenSSH service running. For SFTP protocol connections, the server uses the ...