Emacs / CVS / OpenSSH: preventing password popup

后端 未结 6 1389
失恋的感觉
失恋的感觉 2021-01-18 01:50

I\'m using GNU Emacs on my Ubuntu netbook in fullscreen mode. When I edit files that are under version control and hit C-x v v to commit the latest changes, an OpenSSH popup

6条回答
  •  情书的邮戳
    2021-01-18 02:17

    Try setting this in your environment somehow:

    export CVS_RSH='ssh -o PreferredAuthentications="password"'
    

    That should get it to stop attempting publickey authentication, which will also suppress the display of the graphical ssh-askpass. This works by specifying the SSH command that CVS will use for connecting to the remote server. Please note that this will apply to all CVS commands run from the context in which you set the environment variable.

    You may also want to look into setting it up in your ~/.ssh/config. You can set options for each host separately. Here's a page that roughly shows how, although for forcing publickey auth. Please note that this will affect all SSH usage for your user account, not just for CVS. That may very well be what you're looking for, since you seem to prefer avoiding publickey auth. Here's an example of the block you'd add in ~/.ssh/config:

    Host cvs
    
      Hostname cvs.your.corp
      User yourCVSusername
      PreferredAuthentications password
    

    Alternately, you could change Host cvs to Host cvs.your.corp if your existing means of accessing this uses a FQDN instead of just a hostname.

    Lastly, you could have your ~/.ssh/config file by just this one line (or add it to the top of your existing one):

    PreferredAuthentications password
    

    That will make the preference apply to all SSH connections to remote hosts.

    Best of luck. I hope this gets you out of the modal dialog trap.

提交回复
热议问题