SSH経由でログインできない

SSH経由でログインできない

の助けを借りて、公開鍵と秘密鍵を生成しましたssh-keygen

public_key今、サーバーに追加したいのですが、public_keyサーバーに追加するにはまずサーバーにログインしたいのですが、エラーが発生してサーバーにログインできませんpermission denied(publickey,password)

サーバーにログインして、そのpublic_key内容をサーバー側のauthorized_keyファイルにコピーするにはどうすればよいでしょうか。

/etc/ssh/sshd_config:

Port 22, 
Protocol 2,
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key 
UsePrivilegeSeparation yes
KeyRegenerationInterval yes
ServerKeyBits 768
SyslogFacility AUTH
Loglevel INFO
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubketAuthentication yes
HostbasedAuthentication no
IgnoreRhosts yes
RhostsRSAAuthentication no
PasswordAuthentication yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no
UsePAM yes

の内容/var/log/auth.log

ssh コピー ID

の内容/etc/passwd

/etc/passwd ファイル

の内容auth.log

認証ログ

実行を試みます:ssh -vv [email protected]

debian@192.168.7.2 へログインします。

内容/.ssh/config file

/.ssh/config ファイル

SSH ステータス:

SSH ステータス:

ファイアウォールの実行状態を確認しています:

ファイアウォールの実行状態を確認しています:

ログイン

[sshコピーID]

答え1

ユーザーdebianにシェルが設定されていません。

シェルを次のように設定します。

$ sudo chsh -s /bin/bash debian

関連情報