Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sshd]

the secure shell (SSH) daemon

-2
votes
0answers
19 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
35 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 ...
0
votes
1answer
44 views

Openssh Questions

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
42 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
38 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
26 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
23 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
90 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
14 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
71 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
35 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
55 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
0answers
35 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
45 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
82 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
69 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
49 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-...
0
votes
1answer
50 views

Does systemd by default start a service upon booting OS?

https://unix.stackexchange.com/a/197682/674 says All services are "disabled" by default; "enablement" is opt-in. Is it correct? After I run sudo apt install openssh-server why is sshd ...
1
vote
1answer
44 views

Identical SSH configuration failing

I have 2 windows computers with an identical setup in putty. Same keys, logging into the same user accounts using the same proxy command. These 2 computers connect to my linux network. My linux ...
0
votes
0answers
37 views

chroot multiple directories in linux using active directory groups

I have integrated a linux server with Active directory. I have multiple Active directory groups created sftpgroup1, sftpgroup2 and sftpgroup3. UserA is part of sftpgroup1 and sftpgroup2. I am trying ...
0
votes
0answers
28 views

Cannot ssh after upgrade to Stretch - server refused our keys [duplicate]

I have just successfully upgraded from Jessie to the latest Stretch. I started another instance of putty to verify that I can log in again. And I cannot. Putty says that server refused our keys! I ...
0
votes
0answers
22 views

sshd_config AllowUsers not working for Active Directory users Centos & [duplicate]

I am able to authenticate with my CentOS 7 server using Active Directory account in the format of domain/user or user@local.domain. However, when I edit the sshd_config file and try to explicitly ...
0
votes
1answer
111 views

SSH proxy error [duplicate]

I would like to be able to establish an SSH connection to a remote server, through an IPSec tunnel. So I need to use the local endpoint as an intermediate hop to achieve this. The following command ...
1
vote
0answers
213 views

SSH ClientAliveCountMax & ClientAliveInterval not working

I changed the following SSH config (and rebooted the SSH, or even rebooted the server): ClientAliveCountMax 120 ClientAliveInterval 720 LoginGraceTime 300 Problem is that the parameter "...
0
votes
0answers
66 views

Keep powerline prompt on ssh

I have a powerline bash prompt in iterm2 on my MacOS client and I want to keep the prompt when I ssh into different servers. I regularly ssh into: a local headless vm, a server for school assignments,...
2
votes
2answers
482 views

“Command not found” when using ssh and non absolute commands

I want to use a command over ssh: ssh myuser@myhost mycommand but doing so I always get: sh: mycommand: command not found using following obviously works: ssh myuser@myhost /usr/local/bin/...
1
vote
0answers
22 views

alternative to sshd first-match-only MATCH configuration

Given an openssh (1:7.2p2-4ubuntu2.6 on ubuntu 16.04) installation, I find myself with multiple tiers of groups that I'd like to work with. The way I'm trying to set up the groups is effectively this: ...
1
vote
0answers
84 views

How to change encryption for SSHD in Fedora Server 29?

CRYPTO_POLICY field is empty and I do not know where to start. I only read about LEGACY, DEFAULT and FUTURE options (what is not clear for me absolutely how it is relates to SSHD). # Ciphers and ...
1
vote
1answer
117 views

How could I debug sshd taking several minutes to start?

I use a VM with ssh and X forwarding to run certain applications. When launching the VirtualBox VM, it takes several minutes for ssh to come online, even though the machine is at the desktop ...
1
vote
1answer
594 views

SSH fails with error “Permission denied (Password)”

I am trying to SSH into a PC (lets call it B) with Ubuntu Server 18.04 from a Raspberry Pi (lets call it A) with Raspbian Stretch Lite. Both are on my local network. PublicKeyAuth is disabled and ...
3
votes
3answers
892 views

Can't ssh to server after Debian upgrade to Buster without previous login from “trusted machine”

I have just upgraded my Debian server from Stretch (stable) to Buster (testing). One strange thing I can't seem to resolve: $ ssh vlastimil@192.168.0.102 -p [censored] -o ConnectTimeout=5 -i /home/...
1
vote
2answers
34 views

How to configure ssh to allow specifying a hostname/IP in DISPLAY variable?

I have an old application I'm trying to run on CentOS6 that uses a couple machines: abc1 and abc2. I log into abc1 and run the application, which ssh's to abc2, changes the DISPLAY variable to abc1:0....
1
vote
0answers
550 views

X11 over ssh error: can't open display

I have a desktop and a server both running CentOS 7.5 and I run ssh -X from desktop to the server. After connection is made ~/.Xauthority file is written and I have $ echo $DISPLAY localhost:10.0 $ ...
-3
votes
1answer
3k views

How Fix this Issue rescue-ssh.target is a disabled or a static unit, not starting it

*uname -a Linux xxxxxx 4.18.0-kali1-amd64 #1 SMP Debian 4.18.6-1kali1 (2018-09-10) x86_64 GNU/Linux *apt list openssh-server -a Listing... Done openssh-server/kali-rolling,now 1:7.8p1-1 amd64 [...
0
votes
1answer
105 views

Linux ssh connection without pts

I'm connecting to my server using JSCH and I can't find the login user with the following commands : who w I found that it's not connected as pts : # netstat -tuplena | grep :22 ...... 14918/...
0
votes
1answer
68 views

directory listing command error after install google-authenticator on CentOS 7

Status CentOS 7.5.1804 (Core) Linux 3.10.0-862.14.4.el7.x86_64 Problem After I installed and setting google-authenticator packages, weird authentication related message keep shown when I use ...
1
vote
1answer
606 views

ServerAliveInterval and ServerAliveCountMax

I understand what each one of the alive count max do , but I can't seem to find answer for the following : ServerAliveCountMax Sets the number of server alive messages (see below) which may be ...
1
vote
1answer
925 views

SSH In Windows 10 Bash(Ubuntu)

I'm trying to turn my Windows 10 desktop into a secure ssh server. sshd is running but I can't get any of my other computers to connect to it. I'm using passkey authentication with ed25519. I'm using ...
1
vote
2answers
151 views

AllowUsers in sshd_config from multiple c class ranges

Is there better (shorter) way to do this? AllowUsers user@123.56.177.* user@123.56.178.* user@123.56.179.* Something along the lines of... AllowUsers user@123.56.177/178/179.*
0
votes
1answer
130 views

SSH Client Closed on Command Error

I am using Debian or Windows with Putty to connect to a remote Debian machine via SSH. The remote machine (Debian) behaves differently from the other SSH servers I know so far. Whenever I run a ...
0
votes
2answers
88 views

I'm not getting the output I want from sed when editing sshd_config

I'm writing a program to setup new Debian installs but I can't get sed to do what I want. I want to add new users to sshd_config as allowed users but I get this: This is the result I get now: 6 ...
0
votes
1answer
132 views

No users can ssh using keys into recently upgraded CentOS 7 machines

We have two servers that we just upgraded to CentOS 7 and ever since then, none of our keys work to ssh into them for any of our users, it always goes to passwords. This doesn't happen with our other ...
1
vote
0answers
31 views

How can a script run by a user logged-in over ssh, get the user's public key? [duplicate]

I need to get the users public key, that was used to authenticate the current ssh session. Running env only shows: SSH_CLIENT=192.168.1.2 35538 22 SSH_TTY=/dev/pts/0 SSH_CONNECTION=192.168.1.2 35538 ...
1
vote
0answers
103 views

How to make ssh port 22 not visible (using firewalld)

I have a virtual machine out on the Internet running Fedora 27 and it gets pounded regularly on port 22 with bots attempting to log in. I have disabled root logins to my machine but I'm tired of my ...
4
votes
1answer
43 views

Temporarily restrict logins for a user to a single IP

Background I have a bunch of Raspberry PI 3 devices running Linux, which are shared among multiple engineers. For the sake of simplicity, each Linux box has the same default username/password (i.e. ...
0
votes
1answer
1k views

CentOS 7. SSH Permission denied. Why no password?

I have a frustrating SSH access problem on a new VM with Centos 7 which is driving me crazy!! It seems to be a first-time login problem on the new box. I know all the basic settings ... this is about ...
-1
votes
1answer
222 views

Probe SSH connection and detect ssh disconnect or logout

I'am running a script to connect to another host (via ssh) and it's doing some deployment work. I need to detect the ssh connection is closed/or interrupted, then need to execute a command to delete ...
1
vote
3answers
627 views

start sshd on mac

I'm not able to ssh to localhost on my Mac. I found that sshd is not running in the machine (no process is running on port 22). lsof -i:22 I found some posts asking to enable Remote Login in System ...