使用sftp不用输入密码
生活随笔
收集整理的這篇文章主要介紹了
使用sftp不用输入密码
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1、安裝Git Bash
https://git-scm.com/downloads
2、桌面上鼠標右鍵git bash here
3、執(zhí)行以下命令:
① cd ~/.ssh/ 【如果沒有對應的文件夾,則執(zhí)行 mkdir ./.ssh】
② git config --global user.name “xb12369”
③ git config --global user.email "1234@qq.com"
④ ssh-keygen -t rsa -C "1234@qq.com"
記住,一路回車就行~
4、執(zhí)行以下命令:
找到C:\Users\xb12369.ssh 目錄,里面有兩個文件:id_rsa和id_rsa.pub
5、執(zhí)行以下命令:
配置ssh【這里是id_rsa.pub里面的內(nèi)容啊】
6、執(zhí)行以下命令:
說明:
ssh:// username@host
SFTP配置:
{"protocol": "sftp","host": "shdev01","port": 22,"username": "mayouchen","privateKeyPath": "~/.ssh/id_rsa","remotePath": "/web/dev/app.wmpvp.com/app-mayouchen.wmpvp.com/","uploadOnSave": true,"syncMode": "update","ignore": ["**/.vscode/**","**/.git/**","**/.DS_Store"],"watcher": {"files": "glob","autoUpload": true,"autoDelete": true} }總結
以上是生活随笔為你收集整理的使用sftp不用输入密码的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2019年6月26 突然想到的代码优化
- 下一篇: 唯美个性签名大全171个