Yêu cầu thg 12 14, 2018 9:45 SA 1698 0 3
  • 1698 0 3
+2

Lỗi SSH không connect được vào server

Chia sẻ
  • 1698 0 3

Em đang bị lỗi như này khi thực hiện kết nối ssh tới server dù server đã thêm public key rồi ạ. Và trên máy client thì cũng vẫn tồn tại cả public và private key như đúng theo đường dẫn bên dưới mà ssh client cứ báo là No such file or directory. Nhờ mọi người support em với ạ.

OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2k  26 Jan 2017
debug1: Reading configuration data /home/ubuntu/.ssh/config
debug1: /home/ubuntu/.ssh/config line 24: Applying options for domain.example.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "xxx.xxx.xxx.xxx" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/ubuntu/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ubuntu/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
ssh_exchange_identification: read: Connection reset by peer

3 CÂU TRẢ LỜI


Đã trả lời thg 6 2, 2019 4:06 SA
Đã được chấp nhận
0

Lỗi này do extension cài bên Linode thiết lập chặn IP máy em. Cảm ơn mọi người rất nhiều vì đã vào support.

Chia sẻ
Đã trả lời thg 12 14, 2018 9:58 SA
+1

Em kiểm tra quyền đọc ghi file key đó xem sao, cả quyền của file config nữa. Em gửi cả config ssh bên client lên anh xem nào.

Host centos
    HostName 192.168.1.1
    User hoanghoi
    IdentitiesOnly=yes
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_rsa_centos
Chia sẻ
thg 12 17, 2018 5:58 SA

Không phải do file permission anh ạ. Em vẫn dùng ssh key này bình thường ở những chỗ khác. (^^;)

thg 12 17, 2018 6:16 SA

Em cũng có thử cái config trên rồi những đều vẫn bị lỗi anh ạ.

thg 11 12, 2022 4:48 SA

@huukimit ,bạn ơi cái heroku bạn có thấy thông báo gì không,nó thông báo gì 28/10 không bit nữa

Đã trả lời thg 12 20, 2018 4:31 SA
+1

https://www.digitalocean.com/community/questions/ssh-is-not-working-for-remote-hosts?answer=2459 ở đây có 1 bạn bị tương tự, em thử xem sao ? anh nghĩ là sai permission thư mục .sshauthorized_keys :-?

Chia sẻ
Viblo
Hãy đăng ký một tài khoản Viblo để nhận được nhiều bài viết thú vị hơn.
Đăng kí