Questions tagged [sshd]

the secure shell (SSH) daemon

Most commonly OpenSSH, SSH server software (daemons) accept connections for logins or file transfers.

The OpenSSH home page is: https://www.openssh.com/

715 questions
114
votes
2 answers

How does tcp-keepalive work in ssh?

I am trying to code a shell-script that uses a ssh-connection for doing "heartbeats". I want to terminate the client- and server-side of that connection after a certain timeout (after the connection drops). What I found so far: TCPKeepAlive yes/no…
Nils
  • 18,202
  • 11
  • 46
  • 82
108
votes
2 answers

How can I restart the SSH daemon on Ubuntu?

When I type in service sshd restart I get a sshd: unrecognized service error. I do have, in /etc/ssh/ a file sshd_config that I use to set config. I can also putty into the Ubuntu box (it is remote). When I type in /etc/init.d/sshd restart I get No…
bharal
  • 1,423
  • 3
  • 10
  • 10
89
votes
5 answers

Where are my sshd logs?

I can't find my sshd logs in the standard places. What I've tried: Not in /var/log/auth.log Not in /var/log/secure Did a system search for 'auth.log' and found nothing I've set /etc/ssh/sshd_config to explicitly use SyslogFacility AUTH and LogLevel…
HXCaine
  • 1,119
  • 1
  • 8
  • 9
68
votes
3 answers

How to use ssh over http or https?

I have a linux fedora21 client laptop behind a corporate firewall (which lets through http and https ports but not ssh 22) and I have a linux fedora21 server at home behind my own router. Browsing with https works when I specify my home server's…
MMM
  • 805
  • 1
  • 7
  • 4
61
votes
6 answers

Limit SSH access to specific clients by IP address

How do we allow certain set of Private IPs to enter through SSH login(RSA key pair) into Linux Server?
Ranjan Kumar
  • 819
  • 2
  • 8
  • 10
49
votes
1 answer

Display full settings of sshd

The OpenSSH daemon has many "default" values for its settings. So looking at the sshd_config might not give someone the complete set of active settings. How to display the full sshd configuration (for OpenSSH)?
Huygens
  • 8,985
  • 3
  • 31
  • 36
43
votes
1 answer

Why do portions of SSH public (and private) keys overlap?

Specifically, why are the first 25 characters of ssh Ed25519 public keys always the same? For example, if I make 5 keys with ssh-keygen -o -a 100 -t ed25519, the first 25 characters are always AAAAC3NzaC1lZDI1NTE5AAAAI. I assume this is a preamble…
40
votes
2 answers

Why does sshd requires an absolute path?

Why does sshd require an absolute path when restarting, e.g /usr/sbin/sshd rather than sshd Are there any security implications? P.S the error message: # sshd sshd re-exec requires execution with an absolute path
daisy
  • 53,527
  • 78
  • 236
  • 383
36
votes
6 answers

X client forwarded over SSH "cannot open display: localhost:11.0"

I have enabled X forwarding on remote machine where SSH server is running: # grep -i forward /etc/ssh/sshd_config X11Forwarding yes # On local machine, I have started SSH client with -X flag which instructs the SSH server, running on remote…
Martin
  • 7,284
  • 40
  • 125
  • 208
34
votes
5 answers

tmux session killed when disconnecting from ssh

Summary: I'm trying to figure out why my tmux session dies when I disconnect from ssh Details: I have tmux installed on an Arch Linux system. When I start a tmux session I can detach from it and then attach again while the ssh session is active. …
Gabriel Southern
  • 803
  • 4
  • 9
  • 13
29
votes
3 answers

Authentication refused: bad ownership or modes for file /var/git/.ssh/authorized_keys

EDIT The issue as exposed here is solved (about files modes of the .ssh folder. But an other issue persists so I create a new question : > Unable to login with SSH-RSA key I can no longer connect with ssh-rsa key for a specific user, but it…
Rémi B.
  • 915
  • 3
  • 8
  • 15
21
votes
3 answers

Match multiple users in 'sshd_config'

I'm trying to apply the same sshd settings to multiple users. According to the manual, it seems Match User acts like an AND: Introduces a conditional block. If all of the criteria on the Match line are satisfied, the keywords on the following lines…
IQAndreas
  • 10,145
  • 21
  • 59
  • 79
19
votes
2 answers

SSH ignores characters after correct password string?

Remote machine 10.10.10.1 has password "asdFGH12" for user named "user". I'm able to log in even if I type in password "asdFGH12dasdkjlkjasdus" or any other characters after the "asdFGH12" string. $ ssh -v 10.10.10.1 OpenSSH_5.2p1 FreeBSD-20090522,…
Martin
  • 7,284
  • 40
  • 125
  • 208
17
votes
1 answer

How to cleanup SSH reverse tunnel socket after connection closed?

If I run something like this: ssh -4 -f -N -T -R "/home/dude/lol.socket:192.168.4.44:4444" dude@someserver -p 22 -i privatekey -o "ExitOnForwardFailure yes" -o ConnectTimeout=5 -o ConnectionAttempts=3 -o ServerAliveInterval=15 -o And then lets say…
Timo
  • 583
  • 1
  • 4
  • 13
16
votes
3 answers

ssh-add -D doesn't erase stored keys from the ssh-agent

How come this happens?: stan@tcpc:~/.ssh$ ssh-add -l 8192 e0:45:5e:cc:45:3e:17:2b:a6:54:6f:8d:53:1b:j2:e3 github (RSA) 2048 25:41:53:a6:45:5d:ac:eb:5c:45:f8:ce:42:a9:he:aa BITBUCKET (RSA) stan@tcpc:~/.ssh$ ssh-add -D All identities…
agent_smith
  • 1,495
  • 3
  • 11
  • 8
1
2 3
47 48