CentOSのopensshでパスワードサポートを有効にする方法は?

CentOSのopensshでパスワードサポートを有効にする方法は?

背景:フォロー中。ガイドラインSSHを介してWindowsのCentOS 7仮想マシンで実行されている.NETアプリケーションをデバッグします。そして私はnixのSSHについてほとんど何も知りません。

問題:VSはCentOS SSHサーバーと通信するための共通パスワードが見つからないと文句を言います。私はランダムにdiffie-hellmanを選び、/etc/ssh/sshd_config次のように入れましたCiphers diffie-hellman-group-exchange-sha256。その後、デーモンを再起動しようとしましたが、次のエラーが発生しました。

> systemctl status sshd.service
● sshd.service - OpenSSH server daemon                                                                                                                                           
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)                                                                                        
   Active: activating (auto-restart) (Result: exit-code) since Mon 2021-04-19 17:32:27 +07; 11s ago                                                                              
     Docs: man:sshd(8)                                                                                                                                                           
           man:sshd_config(5)                                                                                                                                                    
  Process: 3077 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)                                                                                                   
 Main PID: 3077 (code=exited, status=255)                                                                                                                                        
                                                                                                                                                                                 
Apr 19 17:32:27 localhost.localdomain systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a                                                                 
Apr 19 17:32:27 localhost.localdomain systemd[1]: Failed to start OpenSSH server daemon.                                                                                         
Apr 19 17:32:27 localhost.localdomain systemd[1]: Unit sshd.service entered failed state.                                                                                        
Apr 19 17:32:27 localhost.localdomain systemd[1]: sshd.service failed.  

サービスの状態を確認すると、より多くの情報を得ることができます。

> systemctl status sshd
Apr 19 17:34:34 localhost.localdomain systemd[1]: Starting OpenSSH server daemon...
-- Subject: Unit sshd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sshd.service has begun starting up.
Apr 19 17:34:34 localhost.localdomain sshd[3083]: /etc/ssh/sshd_config line 29: Bad SSH2 cipher spec 'diffie-hellman-group-exchange-sha256'.
Apr 19 17:34:34 localhost.localdomain systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a
Apr 19 17:34:34 localhost.localdomain systemd[1]: Failed to start OpenSSH server daemon.
-- Subject: Unit sshd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sshd.service has failed.
-- 
-- The result is failed.
Apr 19 17:34:34 localhost.localdomain systemd[1]: Unit sshd.service entered failed state.
Apr 19 17:34:34 localhost.localdomain systemd[1]: sshd.service failed.

VSをCentOSに接続するにはどうすればよいですか?

ベストアンサー1

おすすめ記事