相关疑难解决方法(0)

.profile .bash_profile 和 .bashrc 之间的功能区别是什么

.profile,.bash_profile.bashrc文件之间的功能区别是什么?

linux ubuntu bash profile

285
推荐指数
3
解决办法
13万
查看次数

协议版本不匹配——你的外壳干净吗?

按照此处给出的说明进行 rsync 备份时:http : //troy.jdmz.net/rsync/index.html

我收到错误消息“协议版本不匹配——你的外壳干净吗?”

我在某处读到我需要使提示 (PS1="") 和 motd (.hushlogin) 显示静音才能解决这个问题。我这样做了,提示和登录横幅(MOTD)不再出现​​,但运行时仍然出现错误:

rsync -avvvz -e "ssh -i /home/thisuser/cron/thishost-rsync-key" remoteuser@remotehost:/remote/dir /this/dir/
Run Code Online (Sandbox Code Playgroud)

ssh 客户端和 sshd 服务器都使用协议的第 2 版。

可能是什么问题呢?

[编辑] 我发现http://www.eng.cam.ac.uk/help/jpmg/ssh/authorized_keys_howto.html 指示有时需要“通过使用 -2 标志强制 v2 到 ssh 或 slogin

 ssh -2 -i ~/.ssh/my_private_key remotemachine"
Run Code Online (Sandbox Code Playgroud)

目前尚不清楚这是否解决了问题,因为我认为我在错误更改后进行了此更改,但事实是错误已演变为其他内容。当我了解更多信息时,我会更新这个。我当然会尝试在 emacs shell 中运行它的建议 -

linux backup ssh rsync

75
推荐指数
6
解决办法
8万
查看次数

rsync 协议不兼容

使用以下命令从远程服务器执行 rsync 拉取时:

/usr/bin/rsync -av -e ssh --delete --chmod=a+rwx,g+rwx,o-wx --dry-run username@server:/remote/path/ /home/dir/local/path
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

receiving file list ... Invalid flist flag: 1004
rsync error: protocol incompatibility (code 2) at flist.c(2354) [Receiver=3.0.7]
Run Code Online (Sandbox Code Playgroud)

从远程到本地执行反向操作(即 PUSH)时,我得到以下信息:

building file list ... Invalid flist flag: 1004
rsync error: protocol incompatibility (code 2) at flist.c(2354) [Receiver=3.0.7]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(468) [sender=2.6.8]
Run Code Online (Sandbox Code Playgroud)

我已经尝试将参数一一删除,似乎与 -a 标志有关

环境

# local machine
Linux …
Run Code Online (Sandbox Code Playgroud)

linux unix rsync

6
推荐指数
2
解决办法
9564
查看次数

使用 rsync 的 BackupPC 因“协议版本不匹配 -- 您的外壳干净吗?”而失败。

我刚刚在 Debian 机器中安装了 BackupPC,以将其用作备份服务器。如您所知,该软件使用 rsync 等。使用 rsync 选项时,它失败。

  • 服务器:Debian Jessie。BackupPC 3.3.1 从源代码构建,由用户“backup-user”执行。使用默认选项从源代码构建的 Rsync 3.1.2。

  • 客户:Debian Jessie。使用默认选项从源代码构建的 Rsync 3.1.2。

失败后,可以在 BackupPC 的日志中找到使用的 rsync 命令。在以 BackupPC 用户身份登录的 shell 中尝试该命令时,我遇到了“协议版本不匹配——你的 shell 是否干净?”的问题。错误。命令是:

/usr/bin/ssh -q -x -l backup-user 192.168.10.20 /usr/local/bin/rsync
--server --sender --numeric-ids --perms --owner --group -D --links
--hard-links --times --block-size=2048 --recursive --ignore-times .
/home/backup-user/test
Run Code Online (Sandbox Code Playgroud)

向发送到客户端的 rsync 命令添加一些详细信息,它说(注意远程协议版本):

FILE_STRUCT_LEN=24, EXTRA_LEN=4

(Server) Protocol versions: remote=168430090, negotiated=31
protocol version mismatch -- is your shell clean? 
(see the rsync man page for an explanation) 
[sender] …
Run Code Online (Sandbox Code Playgroud)

ssh rsync backuppc

6
推荐指数
0
解决办法
1290
查看次数

为什么SCP在这种情况下写入0字节?

我正在尝试将我的 ssh 密钥从我的本地虚拟机复制到另一个盒子,一切似乎都正常,但是当我检查远程盒子时,文件不在那里......

Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.0 seconds
Run Code Online (Sandbox Code Playgroud)

scp 看起来没有写任何东西,但我不知道为什么!

我想可能是因为内部网络没有暴露,也许它无法通过 scp 与远程盒子通信,但它似乎在做一些握手......当我 scp 到网络中的盒子时,它工作正常 =/

为什么 scp 在这里不起作用?

我检查了远程框的权限看起来没问题...

没有错误信息...

scp -v 输出

[user] > scp -v my.key.pub www@domain.net:.ssh/
Executing: program /usr/bin/ssh host domain.net, user www, command scp -v -t .ssh/
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to domain.net [xxx.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file …
Run Code Online (Sandbox Code Playgroud)

permissions remote scp

2
推荐指数
1
解决办法
7056
查看次数

标签 统计

linux ×3

rsync ×3

ssh ×2

backup ×1

backuppc ×1

bash ×1

permissions ×1

profile ×1

remote ×1

scp ×1

ubuntu ×1

unix ×1