Điểm:1

Can't SSH into my server from my Mac Terminal and rsync over SSH is suddenly broken too

lá cờ dj

all of a sudden I can't login to my server from my Mac Terminal. On my Linux machine normal ssh login still works, except rsync over ssh also gets stuck.

This is what happenes when I try to connect from my Mac:

ssh -v [email protected]
OpenSSH_7.8p1, LibreSSL 2.6.2
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to xx.xx.xx.xx [xx.xx.xx.xx] port 22.
debug1: Connection established.
debug1: identity file /Users/xx/.ssh/id_rsa type -1
debug1: identity file /Users/xx/.ssh/id_rsa-cert type -1
debug1: identity file /Users/xx/.ssh/id_dsa type -1
debug1: identity file /Users/xx/.ssh/id_dsa-cert type -1
debug1: identity file /Users/xx/.ssh/id_ecdsa type -1
debug1: identity file /Users/xx/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/xx/.ssh/id_ed25519 type -1
debug1: identity file /Users/xx/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/xx/.ssh/id_xmss type -1
debug1: identity file /Users/xx/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Debian-5+deb8u8
debug1: match: OpenSSH_6.7p1 Debian-5+deb8u8 pat OpenSSH* compat 0x04000000
debug1: Authenticating to xx.xx.xx.xx:22 as 'user'
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: 
debug1: Host 'xx.xx.xx.xx' is known and matches the ECDSA host key.
debug1: Found key in /Users/xx/.ssh/known_hosts:28
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/xx/.ssh/id_rsa
debug1: Trying private key: /Users/xx/.ssh/id_dsa
debug1: Trying private key: /Users/xx/.ssh/id_ecdsa
debug1: Trying private key: /Users/xx/.ssh/id_ed25519
debug1: Trying private key: /Users/xx/.ssh/id_xmss
debug1: Next authentication method: password
[email protected]'s password: 
debug1: Authentication succeeded (password).
Authenticated to xx.xx.xx.xx ([xx.xx.xx.xx]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LC_CTYPE = UTF-8
packet_write_wait: Connection to xx.xx.xx.xx port 22: Broken pipe

It was all working fine, and then suddenly it stopped working. I didn't change anything on the server config. Just did some backups via rsync and then in the middle of it rsync just stopped working. It seems to hang at the same place:

Authenticated to xx.xx.xx.xx ([xx.xx.xx.xx]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending command: rsync --server --sender -vltpre.iLsfxC . folder

Any suggestions how to fix this?

Thanks a lot!

Michael Hampton avatar
lá cờ cz
Bạn cần kiểm tra máy chủ để tìm hiểu điều gì đã xảy ra.
Tracy avatar
lá cờ dj
Làm thế nào để làm điều đó? Nhìn vào nhật ký sshd tại /var/log/auth.log tôi chỉ thấy như sshd[16224]: Mật khẩu được chấp nhận cho người dùng từ cổng my.local.ip.addr 40985 ssh2
Michael Hampton avatar
lá cờ cz
Bạn có thể bắt đầu bằng cách đăng nhập vào máy chủ và kiểm tra nhật ký của nó.
Tracy avatar
lá cờ dj
có vẻ như nó có thể đăng nhập nhưng bằng cách nào đó nó không bắt đầu phiên trình bao

Đăng câu trả lời

Hầu hết mọi người không hiểu rằng việc đặt nhiều câu hỏi sẽ mở ra cơ hội học hỏi và cải thiện mối quan hệ giữa các cá nhân. Ví dụ, trong các nghiên cứu của Alison, mặc dù mọi người có thể nhớ chính xác có bao nhiêu câu hỏi đã được đặt ra trong các cuộc trò chuyện của họ, nhưng họ không trực giác nhận ra mối liên hệ giữa câu hỏi và sự yêu thích. Qua bốn nghiên cứu, trong đó những người tham gia tự tham gia vào các cuộc trò chuyện hoặc đọc bản ghi lại các cuộc trò chuyện của người khác, mọi người có xu hướng không nhận ra rằng việc đặt câu hỏi sẽ ảnh hưởng—hoặc đã ảnh hưởng—mức độ thân thiện giữa những người đối thoại.