日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

Ubuntu修改root密码以及允许证书和密码登陆

發(fā)布時間:2024/9/30 Ubuntu 111 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ubuntu修改root密码以及允许证书和密码登陆 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1:修改sshd_config?

root@micro-node3:~# cd /etc/ssh/
root@micro-node3:/etc/ssh# cat sshd_config?

# Package generated configuration file # See the sshd_config(5) manpage for details# What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes# Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 1024# LoggingLogLevel INFO# Authentication: LoginGraceTime 120 #--! PermitRootLogin prohibit-password StrictModes yesRSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile %h/.ssh/authorized_keys# Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes# To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no# Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no# Change to no to disable tunnelled clear text passwords# Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes# GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yesX11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no#MaxStartups 10:30:60 #Banner /etc/issue.net# Allow client to pass locale environment variables AcceptEnv LANG LC_*Subsystem sftp /usr/lib/openssh/sftp-server# Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # and ChallengeResponseAuthentication to 'no'. UsePAM yesUseDNS no AddressFamily inet SyslogFacility AUTHPRIV PermitRootLogin yes PasswordAuthentication no

修改最后一行為PasswordAuthentication yes

2:修改root密碼

修改root密碼

? 1. sudo passwd ?

? 2. Enter new UNIX password: ?

? 3. Retype new UNIX password: ?

?4. passed:finished update successfully.

總結(jié)

以上是生活随笔為你收集整理的Ubuntu修改root密码以及允许证书和密码登陆的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。