sublime text3 能通过 SSH 连接上树莓派,但是不能提交
資深大佬 : xingshu1990 6
需求模拟: 非程序员,业余时间折腾 python,学着编写小段代码, 买了一个树莓派 3B+,装了 V2,也不知道折腾其他什么东西好,自己办公电脑属于老旧配置,pycharm 装起来卡, vscode 不能运行。为什么执意要远程连接?可能是因为部分 python 库 在 linux 下 安装、配置更方便。
sublime text3 版本 3.2.2 安装的是 SFTP sftp-config.json 内容:
"type": "sftp", "save_before_upload": true, "upload_on_save": false, "sync_down_on_open": true, "sync_skip_deletes": false, "sync_same_age": true, "confirm_downloads": false, "confirm_sync": true, "confirm_overwrite_newer": false, "host": "192.168.*", //IP "user": "pi", //"password": "***", //默认密码 //"port": "22", "remote_path": "/opt/**", //某个英文目录 "ignore_regexes": [ "\.sublime-(project|workspace)", "sftp-config(-alt\d?)?\.json", "sftp-settings\.json", "/venv/", "\.svn/", "\.hg/", "\.git/", "\.bzr", "_darcs", "CVS", "\.DS_Store", "Thumbs\.db", "desktop\.ini" ], //"file_permissions": "664", //"dir_permissions": "775", //"extra_list_connections": 0, "connect_timeout": 30, //"keepalive": 120, //"ftp_passive_mode": true, //"ftp_obey_passive_host": false, //"ssh_key_file": "~/.ssh/id_rsa", //"sftp_flags": ["-F", "/path/to/ssh_config"], //"preserve_modification_times": false, "remote_time_offset_in_hours": 100, //"remote_encoding": "utf-8", //"remote_locale": "C", "allow_config_upload": true,
错误信息如下: Uploading “D:sshpy1.py” to “/opt/xxx/xx.py” .. failure (Permission denied) 查了谷歌和百度,说是目录没权限,但是在 opt 目录下:ls -l 信息如下: drwxr-xr-x 3 root root 4096 6 月 16 10:19 blog -rw-r–r– 1 root root 2634 6 月 13 17:29 config.json drwxr-xr-x 3 root root 4096 6 月 16 14:54 op_dd drwxr-xr-x 2 root root 4096 6 月 16 15:33 p*01 drwxr-xr-x 6 root root 4096 5 月 27 15:11 vc
xshell5 习惯性的转默认的 root 账户,连接上树莓派,能切换到相同目录,编辑脚本且保存。不知道是不是因为默认的 pi 账号 权限不够的原因,烦请提供解决方法。 谢谢。
大佬有話說 (2)