Questions tagged [sshd]

the secure shell (SSH) daemon

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

Boot from USB and run sshd on server without keyboard or display

I have an old HP server, would like to Plugin USB and ethernet cable USB boots a linux distro and starts running sshd with default user/password I can then ssh into the box from my laptop. I was ...
user avatar
  • 1
0 votes
1 answer
28 views

Limit SSH access to specific clients by name (not ip)

I recently migrated one of my servers to a RHEL8 equivalent, which means (i) leaving tcp_wrappers behind (since openssh no longer compiles against libwrap), (ii) no longer have the ease and ...
user avatar
0 votes
1 answer
18 views

Migrating SSH servers

I have a server that several clients uses for SSH connections. I'm looking to replace it with a new server but same address. Naturally the new server doesn't have the old server's keys so the SSH ...
user avatar
  • 328
0 votes
0 answers
24 views

Can't get list of files in directory in pam_exec.so script

I'm running a custom script on every ssh login to notify me if there was an a login by an unknown IP address that has not been added to a custom whitelist. I'm using pam_exec.so to check for this ...
user avatar
1 vote
1 answer
38 views

"Authentication refused: bad ownership or modes for directory /home/user" - how to force sshd accept auth despite "wrong" permissions?

For some reasons, I NEED the home directory of some particular user to be group-writable. However, when trying to login to that user with ssh key, sshd refuses the authentication, as it requires the ...
user avatar
  • 685
0 votes
1 answer
66 views

Server still ask for password after ssh-copy-id

I copied my SSH public key to a server using ssh-copy-id, but the server still ask for a password. I checked the permission on the files in the ssh folder and they are readable for user only. I also ...
user avatar
  • 1
1 vote
0 answers
26 views

where to get the diff of changes in the default sshd_config between versions?

I was doing a apt-get upgrade for openssh-server from version 1:8.2p1-4ubuntu0.4 to 1:8.2p1-4ubuntu0.5. During the update it shows A new version (/tmp/filehQFzF3) of configuration file /etc/ssh/...
user avatar
  • 151
0 votes
1 answer
68 views

SSH to arbitrary user

I am working on a project where I run some isolated applications in containers. I want to give certain people access to specific containers over SSH. Until now I have been able to get it working by ...
user avatar
0 votes
0 answers
32 views

Xming X11 forwarding (gedit:3736) Gdk-CRITICAL error connecting Windows 11 machine to Ubuntu 22.04 via

I am trying to X11 forward my Ubuntu 22.04 machine (Raspberry 4 8GB) to my Windows 11 machine on the same network. I went into the /etc/ssh/sshd_config file and uncommented X11forwarding yes and also ...
user avatar
0 votes
1 answer
31 views

How to debug source IP which try to access SSH server through port forwarding by SSH

my case is likely following case: SSH client(192.168.0.11) -> public cloud VM with SSH server and setup port forwarding (139.90.90.90)(CentOS7.9)-> one internal SSH server(10.24.24.24)(CentOS 7....
user avatar
  • 1
1 vote
0 answers
35 views

disable ssh public key auth when user is expired

Environment is Ubuntu Bionic LTS, I have local user account which is expired, i.e. # chage -l user-test Last password change : Apr 28, 2021 Password expires : ...
user avatar
4 votes
1 answer
2k views

Why is zsh listening on port 22?

I'm SSH'ed into a virtual machine and looking at /proc/<pid>/net/tcp for my zsh shell. I see this line sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid ...
user avatar
1 vote
0 answers
45 views

SSH server stops responding every couple of days

I have an always-on mini pc running debian bullseye. I run several services on the machine including dlna and a shadowsocks server plus tvheadend. Every two days the ssh server suddenly stops ...
user avatar
  • 111
2 votes
2 answers
138 views

sshd won't let me enable

I want to use ssh on my device, and I can start sshd just fine with systemctl start sshd, but I want it to start automatically at boot. The problem is, if I try sudo systemctl enable sshd, I get the ...
user avatar
  • 21
0 votes
0 answers
132 views

pam_radius_auth all radius servers failed to respond

I am trying to integrate Radius server 3.0.13 with SSHD so I can enable 2FA. The SSH server is RHEL 8.5. All the time getting error pam_radius_auth all radius servers failed to respond. In my SSH ...
user avatar
1 vote
1 answer
53 views

SFTP from local desktop to Solaris 11 using client tools is failing

I am trying to copy files from my local drive to Solaris 11 host using WinSCP and it is failing with the below error message: Cannot initialize SFTP protocol. Is the host running an SFTP server? I ...
user avatar
  • 15
0 votes
1 answer
89 views

Read key properties

I have multiple keys (some private, some public) and I want to get information about them (their length, their type, anything else). Is that possible?
user avatar
  • 25
0 votes
0 answers
25 views

Set umask for sshfs on OEL

Reading the other posts here, such as set umask for sshfs-mounted filesystem, I am still not getting expected results. Both my systems run OEL7. on machine1, I mount a folder from machine 2 by putting ...
user avatar
0 votes
1 answer
282 views

SSH Connection closed after a short time centos 7

When I trying to connect centos 7 server via ssh it connects asks for username password, I enter then login. But after a while, the connection is closed and doesn't response. Then I go to server ...
user avatar
0 votes
1 answer
62 views

What is the default bind address used when opening an SSH tunnel without explicitly specifying it

When opening an SSH tunnel, e.g. as follows on Ubuntu 21.10: $ ssh -f -N -L 1234:127.0.0.1:5678 user@server what is(are) the default bind address(es) used under the hood (if any)? Is this equivalent ...
user avatar
  • 213
0 votes
1 answer
121 views

Increase SSH Connection timeout on server side without permissions

My goal is to increase my ssh connection timeout on my server, where I have limited permisssions. I do not have permission to even read /etc/ssh/sshd_config (nor append/write) and I do not have sudo. ...
user avatar
1 vote
0 answers
51 views

Unable to re-enable ssh root login in CentOS

I need to be able to copy some files using scp as root, and for this I need to enable ssh login as root; so I edited the file /etc/ssh/sshd_config by changing PermitRootLogin no to PermitRootLogin yes,...
user avatar
  • 251
1 vote
0 answers
35 views

Best practices permissions for /etc/pam.d/sshd

What are the best recommendations for file permissions for /etc/pam.d/sshd? I currently have 0644/-rw-r--r-- root:root and was wondering if it's a good ideea to go to 600. Disclaimer: I use yubikeys ...
user avatar
3 votes
0 answers
214 views

set sshd SELinux security context

I'm working on my custom board and on my custom UNIX-like O.S. . When I connect using ssh and no root users a receve this SELinux error: A valid context for could not be obtained. where user is not ...
user avatar
  • 31
0 votes
0 answers
36 views

How can I transfer my sshd_config changes to the new file during a Debian upgrade?

During a Debian upgrade, a user could be prompted to update their /etc/ssh/sshd_config file: https://superuser.com/questions/1638779/automatic-yess-to-linux-update-upgrade The selected answer here ...
user avatar
  • 263
0 votes
0 answers
75 views

SSH CA signed keys, one accepted, one rejected

I have several CentOS 9 and one CentOS 7 VM. All are configured to trust my SSH CA for Key verification. I can ssh into all of them with key A, but the CentOS 7 VM rejects Key B. I can't seem to ...
user avatar
0 votes
4 answers
77 views

How might I comment out with sed or awk a block of two lines (a unique line followed by an indented nonunique one)?

I wrote the following code: #!/usr/bin/bash wireless_state=$(ip l |grep "3: wlp" |sed -E 's/^.*state ([DOWNUP]{2,4}).*/\1/') ethernet_state=$(ip l |grep "2: en" |sed -E 's/^.*...
user avatar
1 vote
1 answer
188 views

Unable to ssh with private key

I'm trying to connect to remote ssh with private key. But it always prompted to password. The key file id_rsa (this is copy from the server ~//.ssh/id_rsa file): -----BEGIN OPENSSH PRIVATE KEY----- ...
user avatar
  • 113
0 votes
0 answers
46 views

reboot does not set sshd port

I have changed the port for ssh on a debian bullseye system in sshd_config with Port 22222 and expect that this port is automatically set again after a reboot. On two new installation I find that ...
user avatar
0 votes
1 answer
99 views

sshd inactive (dead) even when connected via ssh

I'm running an VPS with Debian 11 on it. I was noticing, that systemctl status ssh says the ssh deamon is incative (dead). I have researched for quite a while and found out, that ssh uses something ...
user avatar
  • 62
2 votes
0 answers
361 views

Unsupported option UsePAM even though OpenSSH is PAM-aware

For my ARM-based Linux system, I crosscompiled OpenSSH, as I need to have a ssh server. In my sshd_config file I set the UsePAM option to yes, because I want to use PAM for the authentication (I need ...
user avatar
0 votes
0 answers
112 views

sshd_config match rule Host not working

Trying to add specific rules based on hostnames in sshd_config. UseDNS is set to yes Match Host remote.address.com AuthenticationMethods "publickey" When trying to connect from that ...
user avatar
  • 395
4 votes
1 answer
6k views

sshd: "no hostkey alg" fixed but still confused

Apparently Fedora 35 does not list ssh-rsa in HostKeyAlgorithms or PubkeyAcceptedKeyTypes so trying to ssh from an old CentOS 6 machine yielded an error: $ ssh as1s16.intra.corp.us no hostkey alg So ...
user avatar
  • 159
0 votes
0 answers
49 views

SSH X11Forwarding: apps display on the server instead of the client

After I login to the server with ssh -X user@192.168.1.100 and launch e.g. brave, Brave is displayed on the server, not the client. Same is for Thunar. However, if I do xfce4-settings-manager, the ...
user avatar
1 vote
2 answers
211 views

Enable/Disable OpenSSH daemon on an interface

I have multiple network interfaces like Ethernet, Wifi, WWAN etc. I want to block SSH root login on all interfaces except for the Ethernet one. Is there an interface-based configuration for sshd, like ...
user avatar
  • 11
0 votes
0 answers
33 views

Weird behaviour of OpenSSH server eating slowly all the available memory

I have a machine running a pgbouncer server and an Open SSH server so clients can enstabilish a tunnel to the server and connect to the database. Now all the clients keep the connection alive for ...
user avatar
0 votes
1 answer
47 views

ssh does not terminate on fatal error

I have a custom sshd service started with ssytemd. It's service file is basically the same as the default openssh-server service file, but specifies a custom sshd_config file which has a custom port ...
user avatar
0 votes
1 answer
36 views

how can I keep my laptop connected to the internet even when it's asleep (or even closed)?

So I've seen from other answers that it's possible to make my laptop stay on when closed. I could also make it not go to sleep in a timer, so then it would just be on all the time. What I'm trying to ...
user avatar
0 votes
1 answer
27 views

Security of /home/.ssh/authorized_keys against spoofing with mount

How is sshd secured against spoofing the home folder with the mount --bind command? I did a test and and mounted the home folder with another folder on a different hard disk. After using the command ...
user avatar
  • 1
0 votes
1 answer
31 views

Can I require per-user AuthenticationMethods when switching from a non-root user to a root user?

I currently SSH into a root user from another machine with an SSH key & 2FA, so I set AuthenticationMethods publickey,keyboard-interactive. If possible, I would like to be able to SSH into a non-...
user avatar
0 votes
2 answers
824 views

Why ssh.service doesn’t start automatically during boot despite being enabled by systemd?

I’m using Debian 11 on a Raspberry Pi 4 (image found here). sshd is properly configured (I only edited /etc/ssh/sshd_config, the rest is completely fresh from system installation) and works correctly ...
user avatar
1 vote
0 answers
126 views

How can I stop SSH server to send logs to syslog?

Debian 10 I have a lot of log info like this: localhost systemd[1]: Started Session 30522 of user xxxx. How can I stop sshd to send logging info to sysconf ? Thank you I reproduced what the ...
user avatar
0 votes
0 answers
107 views

Change default SFTP directory in Cygwin

On a Windows server, I've installed OpenSSH via Cygwin to mainly connect via SFTP. I would like to change the default directory for the SFTP server. When I log via ssh to this server, my entry point ...
user avatar
  • 161
1 vote
1 answer
652 views

Why ssh.socket is set to conflict with ssh.service (Ubuntu 18.04.3)?

Description of condition I ran into a strange condition with systemd and ssh on Ubuntu 18.04.3 LTS I checked the status of the ssh.socket unit: $ systemctl status ssh.socket ● ssh.socket - OpenBSD ...
user avatar
  • 257
1 vote
1 answer
4k views

How to enable ssh-rsa in sshd of OpenSSH 8.8?

Since OpenSSH release 8.8 ssh-rsa is disabled in OpenSSH sshd: $ ssh-audit 1.2.3.4 # algorithm recommendations (for OpenSSH 8.8) ... (rec) +ssh-rsa -- key algorithm to ...
user avatar
  • 4,254
7 votes
3 answers
6k views

sshd: what are the practical effects of setting "UsePAM no"

in /etc/ssh/sshd_config, PAM is enabled by default on Debian 10: UsePAM yes In a situation when I don't want to allow login with password or kerberos, and only want to allow SSH key authentication, ...
user avatar
0 votes
1 answer
118 views

Can't SSH in using IP but can SSH using domain

I’m using bash shell and attempting to login to an Ubuntu box Host remote.web.domain Hostname 25.10.25.10 User remote user IdentityFile ~/.ssh/id_rsa ForwardAgent yes IdentitiesOnly yes ...
user avatar
  • 1,860
-1 votes
1 answer
70 views

I want to connect to a server on centos on parallels(from Mac)

The server is running on localhost:3650 on CentOS and I need to be able to visit that link from the host computer(Mac).
user avatar
0 votes
1 answer
40 views

sshd on yocto linux consistenaly disconnects me

We have our own yocto image on IMX8 device (NXP). The device internet is served by simcon EU 4G modem and IOT sim (Monogoto). The connection id created with libqmi and created wwan0 successfully. the ...
user avatar
0 votes
0 answers
42 views

How to make each SFTP user unable to see each other's files with ChrootDirectory, but still allow Apache to serve files?

Let's say I'm giving SFTP access to 3 friends on my server: /friends/alice /friends/bob /friends/eve I'd like to prevent each user to list see each other's files. So an easy solution, ...
user avatar
  • 2,153

1
2 3 4 5
13