I recently purchased Terra-Master F4-220 but I can not sign in via ssh. I thing is I don't think it's on the TM end, I think it's on my debian server's end. When I do try and connect this is what I get.

$ssh root@192.168.1.2
/etc/ssh/ssh_config: line 55: Bad configuration option: permitrootlogin
/etc/ssh/ssh_config: line 55: Bad configuration option: allowusers
/etc/ssh/ssh_config: terminating, 2 bad configuration options

Here is a sample of the tail end of the /etc/ssh/ssh_config file.

PermitRootLogin yes
AllowUsers root garrett media plex rsync

Any ideas as to what the problem could be. I purchased the TM becaue I thought it would be easier to maintain my movies and tv shows media server than the headless debian server I built and am currently using. The TM can install Plex and DLNA with just a click. All I am trying to do is copy the movies files currently store on my debian server to the TM. Thanks for any help.

Dani AI

Generated

has the root cause: your SSH client is dying before it ever reaches the Terra-Master because two server-only directives were placed in the client config. ssh_config is for the client, while options like PermitRootLogin and AllowUsers belong in the server’s sshd_config. That is why the client reports "Bad configuration option" and exits. See the OpenSSH manuals for the roles of ssh_config (client) and sshd_config (server). OpenSSH ssh_config man page OpenSSH sshd_config man page

Quick fix you can apply now:

  • On your Debian box, comment out those lines in /etc/ssh/ssh_config and try ssh root@192.168.1.2 again.
  • If you want to control who can log in to the NAS, put those directives on the NAS itself in /etc/ssh/sshd_config, validate the file with sshd -t to avoid locking yourself out, then restart the SSH daemon on the NAS. sshd(8) -t test mode

Tip: keep client-side tweaks per host so they never break all SSH connections. For example, in ~/.ssh/config:

Host terra-nas
  HostName 192.168.1.2
  User <your-nas-user>
  IdentityFile ~/.ssh/id_ed25519

Security note: instead of enabling password-based root logins, prefer keys and set PermitRootLogin to prohibit-password (or no) on the NAS. Then copy your media with rsync, e.g.:

rsync -avh --progress /path/to/movies/ user@192.168.1.2:/path/on/nas/

This keeps things working, safer, and easier to maintain. OpenSSH sshd_config man page

Blatent copy from link below:

TL;DR The line PermitRootLogin yes does not belong in the ssh_config file, only in the sshd_config file.

The file ssh_config describes the configuration options for the client. As the error logs say, there is no such option PermitRootLogin for the client. The sshd_config file however, describes the options for the daemon. (You can recognise this because of sshd) The server/daemon does have a PermitRootLogin option, so it belongs there.
From https://superuser.com/questions/908179/ubuntu-plesk-ssh-issues-permitrootlogin

Probably same issue for line 2.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.