Failed to start OpenSSH server daemon, Subsystem 'sftp' already defined.

Solution Verified - Updated -

Issue

  • ssh: connect to host xxxxx port 22: Connection refused Connection closed

  • Failed to start/restart sshd service.

    sshd[xxxx]: /etc/ssh/sshd_config line xx: Subsystem 'sftp' already defined.
    systemd[x]: sshd.service: Main process exited, code=exited, status=255/n/a
    systemd[x]: sshd.service: Failed with result 'exit-code'.
    systemd[x]: Failed to start OpenSSH server daemon.
    

Environment

  • Red Hat Enterprise Linux (All versions)
  • openssh

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content