Think before you speak, read before you think.

ssh config 针对某些机器密码登陆

一些机器不要公钥登陆,在每次连的时候提示密码

Host kong
Hostname 192.168.1.200
User jpuyy                                                              
Port 22                                                                         
PreferredAuthentications password

服务端,例如 sftp 可以允许密码登录的话

Match user jpuyy address 192.168.1.0/24
    PasswordAuthentication yes
    # also since we want only sftp
    ForceCommand internal-sftp


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *