Questions tagged [sshd]

the secure shell (SSH) daemon

Filter by
Sorted by
Tagged with
1
vote
0answers
15 views

Headless armbian device stopped responding to ssh

I have a headless device (Orange Pi Zero) running Armbian that I use to experiment with. Today it suddenly stopped responding to SSH (my only means of interacting with the device): mark@mark:~$ ssh ...
2
votes
2answers
83 views

ssh is not working but telnet to the port 22 is successful

I tried to ssh to one of our newly installed servers in our DC. Our NOC team is able to ssh the server from their machines. However, we usually connect to servers in our DC using landing machines, ...
-2
votes
0answers
28 views

Still getting password prompt when SSH'ing while using DSA keys (on Synology NAS)

I don't understand why the password-less auth does not work. I've checked permissions, even disabled StrictModes, and restarted. Nothing works!? Could you help, please? Here's the SSHD config: ...
0
votes
0answers
11 views

How can I rebooting whes there hasn't been an ssh session in a while?

I have a Raspberry Pi with a problematic sshd. Periodically, it just starts refusing connections and will continue to do so until restarted. I could spend hours debugging that or I could just make a ...
0
votes
2answers
33 views

Blocking direct access to files (scp or ftp-like behaviour) on ssh server for some users

Is there any way to allow users to only login on terminal shells through ssh ensuring that every connection is gonna run only what's scripted on .profile file? We wanna block users of accessing the ...
1
vote
0answers
44 views

SSH Proxy Session Hung Indefinitely

I have an SSH connection flow of client -> proxy server -> server which is established via Net::SSH::Proxy in ruby (this looks to be an SSH problem, not a ruby problem). Once the connection is ...
1
vote
1answer
23 views

In RHEL7 is it possible to allow only some users to create ssh tunnels

I want to setup a RHEL7 host that will allow a few people to ssh in. Let say 10 people will be able to access the box via ssh. Of those 10 people I only want 3 to be able to create a tunnel to other ...
15
votes
1answer
2k views

How can I truly shut down ssh server?

I disable the ssh server with systemctl disable ssh then reboot. After reboot, I still can log into the remote server through ssh. I use systemctl status ssh to check the server status and it is ...
0
votes
1answer
25 views

Block user without pem with SSH

I have Amazon Linux server and just realize that I can access my server without pem. In my server's /etc/ssh/sshd, "PasswordAuthentication no" and "ChallengeResponseAuthentication no". But when I ...
0
votes
0answers
24 views

Cannot setup ssh server

I'm trying to setup my ssh server at home, but cannot make it work yet. I already forwarded the IP inside the router website. I have an external IP. I can access to my router's config using it. I ...
3
votes
1answer
35 views

Why does SSH_AUTH_SOCK and SSH_AGENT_PID unsets after a while in Amazon Linux?

We have a build system that needs an active ssh connection with mercurial and to do so, it needs an ssh-agent loaded with a key constantly.. The thing is that, even though that after creating the ssh ...
1
vote
1answer
22 views

Run ssh daemon in different namespace to connected clients

If sshd is running in the (non-init) namespace of the appropriate physical device: ip netns exec physical sshd is it possible to have clients that connect on that interface get a shell with the ...
1
vote
1answer
22 views

SSH - Permission denied (publickey) - doesn't work in case of one node

I have 3 nodes: node A, B and C. A wants to connect to B and C via ssh. B and C are identical servers. A can connect to B but cannot to C. ssh user@node The error I see: Permission denied (...
1
vote
1answer
36 views

SSH ForceCommand for shell while keeping regular login and remote command execution possible

How can I run/tweak this command and while using ForceCommand to give this user their shell? Client Command (cat ./sudoPassword ./someCommandInput) | ssh user@ip "sudo -Sp '' someCommand" Server ...
0
votes
0answers
40 views

SSH Port Forwarding channel 2 open failed: Connection refused

Trying to test a setup for ssh forwarding but keep running into problems. Here's the setup: Local machine runs command: ssh -fNT -v -v -L 8087:127.0.0.1:8077 user@remotehost and then remote ...
0
votes
1answer
32 views

terminate ssh session on host reboot

assume I have a ssh session to a remote host like ssh user@host tail for example and now somehing causes that host to reboot. How can I configure the session to terminate immediately and return back ...
2
votes
0answers
19 views

Why is StreamLocalBindUnlink disabled by default?

I want to enable GPG agent forwarding, and found that StreamLocalBindUnlink is disabled by default on sshd. Why is it disabled by default? Is there any security risk in enabling it? Since X11 ...
0
votes
1answer
31 views

Email on failed SSH login attempt?

I was wondering if it is possible to set it up in such a way that on a failed SSH login centos will send me an email? And of course if the computer is not connected to the internet when the attempt ...
0
votes
0answers
54 views

CentOS7 OpenSSH won't start with machine and hangs when ran via systemctl

The SSHD service is enabled on my VM, however it does not start when the machine boots. Further, if I run systemctl start sshd it simply hangs. If I manually run /usr/sbin/sshd, it starts no problem ...
1
vote
0answers
19 views

fail2ban not detecting ssh failures on CentOS 7

I've installed fail2ban on CentOS 7 and added jail.local: [sshd] enabled = true When I try a bad ssh login, I get a log entry in /var/log/secure like this: Jun 5 11:09:40 arsenal sshd[32595]: ...
0
votes
2answers
36 views

Using SED to uncoment a config file line, and replace text in a Linux config file

I am trying to automate configuraiton of certain parameters in my /etc/ssh/sshd_config file, most notably the #PermitRootLogin yes and #LoginGraceTime 2m They should read: PermitRootLogin no ...
1
vote
1answer
55 views

List all connected and previously connected users to SSH tunnel

I want to know who is accessing my server at any point in time and see logs from the past, however it is behind an SSH tunnel. How can I do this? EDIT: See tags, running debian on both machines. SSHD ...
0
votes
0answers
69 views

Automatically terminate lost SSH sessions

Sometimes when I'm on a sketchy internet connection like an airplane, my ssh session drops suddenly. When this happens, I want the sshd server to automatically kill the session after a few seconds, ...
2
votes
1answer
94 views

systemctl cannot restart sshd

Strange thing happens: via systemctl I cannot start SSHD: SERVER:~ # systemctl status sshd ● sshd.service - OpenSSH Daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor ...
2
votes
1answer
48 views

Selinux causing sshd to fail when using AuthorizedKeysCommand

I have been following Gitlab's guide to enable Fast lookup of authorized SSH keys. Guide instructs to use AuthorizedKeysCommand. Authorized command is calling local https server. This command chain ...
0
votes
0answers
14 views

Wsl kali startup

i set up sshd on kali,but i'm un able to set it up as an automatic process My server is 70 km far away i can Wake on lan the machine with my mobile,then i can not ssh cause Windows 10 pretend to give ...
0
votes
1answer
30 views

Ubuntu SSH Auth Log Shows Proxy IP

I am trying to figure out an issue I have been having. I am using a webpanel called TinyCP and there is a table for displaying failed login attemps via SSH. All SSH attempts, failed or successful, ...
0
votes
2answers
96 views

error while starting open ssh : /usr/sbin/sshd: /lib/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /usr/sbin/sshd)

I am working on an embedded board, to access that board I need ssh to work smoothly. Currently, for debugging purpose I am using serial connection to access the board. Now, when I try to start ...
0
votes
1answer
26 views

Can sshd be configured to support multiple connections when running standalone?

I'm trying to create an SSH server Docker image that can establish multiple concurrent connections: Server > sudo /usr/sbin/sshd -Ddp 1234 Client 1 > ssh user@server -p 1234 user@server's ...
1
vote
1answer
94 views

Restrict SFTP user to run only limited set of commands/action in Linux

How to restrict SFTP users to run only limited set of commands/actions. For users connected to shell there is a option to configure restricted shell. Once done user can run only allowed commands. e....
0
votes
1answer
42 views

Can't get SSH daemon running on macOS

The server is running macOS Mojave 10.14.4. I'm unable to get the SSH daemon to start. After logging in locally, I run: $ launchctl list | grep ssh - 0 com.openssh.ssh-agent $ ps -A | grep ssh ...
-2
votes
1answer
172 views

AWS transfer for sftp - Increase sftp session timeout from server

I'm using Aws transfer for sftp as sftp server, but when i connect to sftp from any client (winscp, linux, aws linux server) it keeps disconnecting after 3,4 minutes. But when i change ssh server ...
0
votes
1answer
65 views

Cannot SSH into server because authorized_keys is in a different folder

I was able to SSH into this remote server using password authentication before. I wanted to change that to make it use private/public key pairs instead. I followed the necessary steps by generating a ...
-1
votes
1answer
53 views

Openssh Questions [closed]

I was reading about OpenSSH and I have the following questions: What is the difference between ssh and slogin? What is the difference between scp and sftp? Does sshd (on server side) provide separate ...
0
votes
1answer
57 views

Is someone trying to connect to my VPS?

When I make the command journalctl -xe on my VPS (Debian 9) host by OVH, I see several attempts to connect, is this normal? Here is a small part of the logs: -- Logs begin at Mon 2019-04-08 22:51:43 ...
2
votes
1answer
100 views

How to secure ~/.ssh/authorized_keys file?

I have a machine with public key authentication enabled. I have some authorized keys at ~/.ssh/authorized_keys. I'm worried about the case I ever mistakenly run a malicious script/program with my ...
2
votes
1answer
45 views

sshd: Allow direct login for certain public keys and require password also for the rest

I have a server running sshd. I have a secure machine with a ssh key. I want to allow direct public key login to the server with the secure machine's key. I also have a laptop with a different ssh ...
2
votes
0answers
43 views

ssh - Connection time out after successful connection and exit

I have configured my desktop Ubuntu with sshd and I'm testing that I can log in through a public IP from my Mac. When logging through ssh, the first time works perfectly, but as soon as I close the ...
2
votes
1answer
34 views

OpenSSH: if the server is set to “PasswordAuthentication no” then is there any risk if the *client* is set to “PasswordAuthentication yes”?

For all my servers PasswordAuthentication is set to no in the sshd_config file. This means that only key authentication is allowed. In this situation, is there any risk if PasswordAuthentication is ...
1
vote
0answers
31 views

Passing remote server hostname and username in variables via SSH [closed]

I need to do SSH to a remote server by expanding servername and user from the variables. I tried several ways but couldn't get thru the script. hardcoded servername and user which was working as ...
1
vote
0answers
2k views

Failed to start OpenSSH server daemon

I am using centos7. I was trying to change the port of ssh and I changed the the port in /usr/lib/firewalld/services/ssh.xml I also change the port in the /etc/ssh/sshd_config file But when I ...
0
votes
1answer
15 views

Force SFTP user to login to specific dir

The end goal here is to have an sftp user that logs into /home/user1/data I have followed the instructions at the link below and they do work: https://www.vultr.com/docs/setup-sftp-only-user-accounts-...
3
votes
1answer
111 views

Running a script prior to ssh login … but only once

I'm hoping someone can offer some insight on this problem, I found a solution to execute a script before an ssh login. It was done by placing the following line within /etc/pam.d/sshd and allowing pam ...
1
vote
1answer
69 views

Can't find SSHD/systemd socket-activated logs

I'm trying to view the logs for my SSH server (CentOS 7) but cannot seem to find them. It's configured to use the systemd socket activation. I normally expect to find them with journalctl -b -u sshd....
1
vote
1answer
61 views

Is this SSHD config appropriate / secure [closed]

On the latest Debian Stretch I installed an OpenSSH server which I set up under the following conditions. no root login no password authentication / force public key authentication authentication by ...
1
vote
1answer
54 views

ssh to full schroot environment (debian)

How can I SSH into a schroot environment using ssh sshuser@192.168.1.20 rather than schroot -c test as user sshuser ? I have read an array of web post on creating a jailed chroot then setting up ...
1
vote
1answer
52 views

Changing SSH Default Port 22 to 444

I have changed the default port number in /etc/ssh/sshd_config. When I start ssh service it does start, but when I run service sshd status it is stopped: I am using CentOS 6.4.
1
vote
0answers
243 views

No user exists for uid 721001106 when running ssh command within SSH chroot directory

I am running debian 8 with SSSD authentication. The authentication works and ssh works fine. I have copied all libraries etc over to my SSH chrootdirectory and all my applications work except ssh ...
0
votes
1answer
160 views

How to record shell commands of all ssh sessions of all users accessing the same router/server to a log file in linux?

without using any built-in commands like history because if history is cleared all commands will be gone,but in my log file it must be present every time. As per my understanding, 1.A daemon should ...
0
votes
0answers
87 views

how to ssh into a lxc-container

I need a user that connects to my host with ssh, which is forwarded into a lxc-container. My solution is: Match User monitoring ChrootDirectory /data/foreign_projects/monitoring ForceCommand lxc-...