AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-565634

Tim Hilt's questions

Martin Hope
Tim Hilt
Asked: 2021-04-16 02:58:03 +0800 CST

rsync 复制所有具有可执行权限的文件

  • 2

我运行以下命令来备份我的主目录:

$ rsync -ahv \
      --info=progress2 \
      --partial \
      --exclude=.cache/ \
      --exclude=.miniconda3/ \
      --exclude=.thunderbird/ \
      --exclude=.vscode/ \
      --exclude=.cargo/ \
      /home/tim \
      /run/media/tim/Volume/Backups/Tim/2021-04-15/

但是,当命令完成时,我注意到我的所有文件都设置了可执行标志!例如,当查看我的Cheatsheets-directory 时:

$ ls -l /home/tim/Cheatsheets/
total 3932
-rw-r--r-- 1 tim tim 2056316 11. Dez 14:43 comprehensive-latex-symbol-list.pdf
-rw-r--r-- 1 tim tim  112655 16. Feb 2019  EmacsCheatsheet.pdf
-rw-r--r-- 1 tim tim  186060  7. Jun 2019  GoogleColabShortcuts.png
-rw-r--r-- 1 tim tim  217283 12. Dez 23:44 JupyterLabShortcuts.pdf
-rw-r--r-- 1 tim tim   28664  3. Mai 2019  JupyterNotebookCheatsheet.pdf
-rw-r--r-- 1 tim tim   82953 25. Jan 2019  LaTeX_Cheatsheet.png
-rw-r--r-- 1 tim tim  261478 22. Sep 2018  LaTeXMathSymbols.pdf
-rw-r--r-- 1 tim tim  574022 24. Okt 2018  LTspiceShortcuts.pdf
-rw-r--r-- 1 tim tim     634 24. Okt 2018  MagitWorkflow.org
-rw-r--r-- 1 tim tim   17754 24. Okt 2018  MagitWorkflow.pdf
-rw-r--r-- 1 tim tim   60448 24. Dez 2018  NeotreeCheatsheet.png
-rw-r--r-- 1 tim tim  169752 18. Feb 2019  PCRE_Cheatsheet.png
-rw-r--r-- 1 tim tim  146499 21. Mär 2019  VSCodeShortcuts.pdf
-rw-r--r-- 1 tim tim   79881  6. Nov 2018  WiresharkShortcuts.pdf

而在备份目录中:

$ ls -l /run/media/tim/Volume/Backups/Tim/2021-04-15/tim/Cheatsheets/
total 5888
-rwxr-xr-x 1 tim tim 2056316 11. Dez 14:43 comprehensive-latex-symbol-list.pdf
-rwxr-xr-x 1 tim tim  112655 16. Feb 2019  EmacsCheatsheet.pdf
-rwxr-xr-x 1 tim tim  186060  7. Jun 2019  GoogleColabShortcuts.png
-rwxr-xr-x 1 tim tim  217283 12. Dez 23:44 JupyterLabShortcuts.pdf
-rwxr-xr-x 1 tim tim   28664  3. Mai 2019  JupyterNotebookCheatsheet.pdf
-rwxr-xr-x 1 tim tim   82953 25. Jan 2019  LaTeX_Cheatsheet.png
-rwxr-xr-x 1 tim tim  261478 22. Sep 2018  LaTeXMathSymbols.pdf
-rwxr-xr-x 1 tim tim  574022 24. Okt 2018  LTspiceShortcuts.pdf
-rwxr-xr-x 1 tim tim     634 24. Okt 2018  MagitWorkflow.org
-rwxr-xr-x 1 tim tim   17754 24. Okt 2018  MagitWorkflow.pdf
-rwxr-xr-x 1 tim tim   60448 24. Dez 2018  NeotreeCheatsheet.png
-rwxr-xr-x 1 tim tim  169752 18. Feb 2019  PCRE_Cheatsheet.png
-rwxr-xr-x 1 tim tim  146499 21. Mär 2019  VSCodeShortcuts.pdf
-rwxr-xr-x 1 tim tim   79881  6. Nov 2018  WiresharkShortcuts.pdf

从rsyncs 手册页中,我看到-a我使用的标志是 的别名-rlptgoD,-p应该保留权限。这个命令我哪里出错了?

backup linux permissions rsync file-permissions
  • 1 个回答
  • 370 Views
Martin Hope
Tim Hilt
Asked: 2020-10-06 07:43:06 +0800 CST

SSH 无法连接到 Google Cloud Compute-Engine-Instance:权限被拒绝(公钥)

  • 0

我按照本教程介绍了如何使用 ssh 设置 GCE-VM。但是,我似乎无法像视频中的那个人那样通过 ssh 成功连接!这是我尝试连接时的输出(IP 是虚构的):

~ λ ssh -v 34.89.154.144
OpenSSH_8.3p1, OpenSSL 1.1.1h  22 Sep 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 34.89.154.144 [34.89.154.144] port 22.
debug1: Connection established.
debug1: identity file /home/tim/.ssh/id_rsa type 0
debug1: identity file /home/tim/.ssh/id_rsa-cert type -1
debug1: identity file /home/tim/.ssh/id_dsa type -1
debug1: identity file /home/tim/.ssh/id_dsa-cert type -1
debug1: identity file /home/tim/.ssh/id_ecdsa type -1
debug1: identity file /home/tim/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/tim/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/tim/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/tim/.ssh/id_ed25519 type -1
debug1: identity file /home/tim/.ssh/id_ed25519-cert type -1
debug1: identity file /home/tim/.ssh/id_ed25519_sk type -1
debug1: identity file /home/tim/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/tim/.ssh/id_xmss type -1
debug1: identity file /home/tim/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.10 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to 34.89.154.144:22 as 'tim'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:w2LwJiLfvysv6AJDqA6R0u5dZuXVbwdqXsQCZ0IhlT8
debug1: Host '34.89.154.144' is known and matches the ECDSA host key.
debug1: Found key in /home/tim/.ssh/known_hosts:2
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/tim/.ssh/id_rsa RSA SHA256:DDVIWu+4qABFT+8uCSJuZ9bSh4y1FH+zAW2owNw1J7I
debug1: Will attempt key: /home/tim/.ssh/id_dsa
debug1: Will attempt key: /home/tim/.ssh/id_ecdsa
debug1: Will attempt key: /home/tim/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/tim/.ssh/id_ed25519
debug1: Will attempt key: /home/tim/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/tim/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/tim/.ssh/id_rsa RSA SHA256:DDVIWu+4qABFT+8uCSJuZ9bSh4y1FH+zAW2owNw1J7I
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/tim/.ssh/id_dsa
debug1: Trying private key: /home/tim/.ssh/id_ecdsa
debug1: Trying private key: /home/tim/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/tim/.ssh/id_ed25519
debug1: Trying private key: /home/tim/.ssh/id_ed25519_sk
debug1: Trying private key: /home/tim/.ssh/id_xmss
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).

我试图解决的问题:

  1. 在不同的区域(亚洲而不是欧洲)设置 VM
  2. 使用不同的映像设置 VM(debian、ubuntu、minimal 和 standard)
  3. 在 Windows 和 Linux 下尝试设置
  4. enable-oslogin = TRUE项目范围和特定实例
  5. 从公共 ssh-key 中删除主机部分
  6. ssh [IP], ssh [USER_IN_KEY]@[IP],ssh [USER_ON_VM]@[IP]

我真的不知道在哪里寻找问题了!谁能给我一个关于我可以尝试什么或问题可能出在哪里的指针或建议?

谢谢!

linux ssh google-cloud-platform google-compute-engine ssh-keys
  • 2 个回答
  • 663 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve