2012-05-22 24 views
8
git push heroku master 

lợi nhuận:SSH Lỗi: "Không phải là một RSA1 chủ chốt tập tin ~/.ssh/id_rsa.", "Key_type_from_name: unknown chìa khóa gõ '----- BEGIN"

ssh_exchange_identification: read: Connection reset by peer  
fatal: The remote end hung up unexpectedly. 

Đây là lần đầu tiên tôi đã cố gắng để đẩy đến heroku.

  • heroku login lợi nhuận "Xác thực thành công"
  • ~/.ssh/id_rsa ban đầu được tạo ra bởi các Heroku khách hàng dòng lệnh - Tôi chạy heroku login cho lần đầu tiên và nó hỏi nếu tôi muốn tạo ra một chìa khóa.
  • Tôi đã tạo lại các phím bằng cách sử dụng ssh-keygen -t rsa (như được chỉ định here) và sau đó thử lại nhưng vô ích.
  • Tạo "authorized_keys" tại "~/.ssh" và với khóa công khai của tôi trong đó, không có may mắn.
  • Tạo /etc/hosts.allow với nội dung "sshd all", vẫn không có may mắn.

Quyền trên các phím là: "-rw -------" Trạng thái Heroku là O.K. Tôi đang sử dụng Mac OS X 10.7.

ssh -vvv [email protected] 

lợi nhuận:

OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011 
debug1: Reading configuration data /etc/ssh_config 
debug1: Applying options for * 
debug2: ssh_connect: needpriv 0 
debug1: Connecting to heroku.com [50.19.85.132] port 22. 
debug1: Connection established. 
debug3: Not a RSA1 key file ~/.ssh/id_rsa. 
debug2: key_type_from_name: unknown key type '-----BEGIN' 
debug3: key_read: missing keytype  
debug3: key_read: missing whitespace 
debug3: key_read: missing whitespace 
debug3: key_read: missing whitespace  
debug3: key_read: missing whitespace 
debug3: key_read: missing whitespace 
debug3: key_read: missing whitespace 
debug3: key_read: missing whitespace 
debug3: key_read: missing whitespace 
debug3: key_read: missing whitespace 
debug3: key_read: missing whitespace  
debug3: key_read: missing whitespace  
debug3: key_read: missing whitespace  
debug3: key_read: missing whitespace  
debug3: key_read: missing whitespace  
debug3: key_read: missing whitespace  
debug3: key_read: missing whitespace  
debug3: key_read: missing whitespace   
debug3: key_read: missing whitespace   
debug3: key_read: missing whitespace    
debug3: key_read: missing whitespace    
debug3: key_read: missing whitespace    
debug3: key_read: missing whitespace    
debug3: key_read: missing whitespace    
debug3: key_read: missing whitespace   
debug3: key_read: missing whitespace    
debug2: key_type_from_name: unknown key type '-----END'    
debug3: key_read: missing keytype    
debug1: identity file ~/.ssh/id_rsa type 1    
debug1: identity file ~/.ssh/id_rsa-cert type -1    
debug1: identity file ~/.ssh/id_dsa type -1    
debug1: identity file ~/.ssh/id_dsa-cert type -1    
ssh_exchange_identification: read: Connection reset by peer    
+0

Mùi giống như một khóa bí mật bị hỏng hoặc không hợp lệ. File ~/.ssh/id_rsa được tạo ra như thế nào? –

+0

Khách hàng Dòng lệnh Heroku đã tạo ra nó, chạy "đăng nhập heroku" lần đầu tiên được hỏi nếu tôi muốn tạo một tài khoản (tôi chưa có). Sau đó, để tạo lại tôi đã sử dụng "ssh-keygen -t rsa". – rishabhjain

+0

Điều này trước đây có hoạt động không, sau đó dừng lại? Nếu bạn chạy '$ heroku login' bạn sẽ nhận được gì? – Schneems

Trả lời

0

Nếu tôi cố gắng

ssh -vvv [email protected]

tôi có được điều này:

debug2: key_type_from_name: unknown key type '-----END' 
... 
debug3: check_host_in_hostfile: filename ~/.ssh/known_hosts 
debug3: check_host_in_hostfile: match line 1 
debug3: check_host_in_hostfile: filename ~/.ssh/known_hosts 
debug3: check_host_in_hostfile: match line 2 
debug1: Host 'heroku.com' is known and matches the RSA host key. 
debug1: Found key in ~/.ssh/known_hosts:1 
debug2: bits set: 500/1024 
debug1: ssh_rsa_verify: signature correct 

Bạn có một tập tin known_hosts trong ~/.ssh/? Mỏ chứa các mục nhập cho heroku.com,50.19.85.154 ssh-rsa50.19.85.132 ssh-rsa. Bạn có cái đó không?

Nếu bạn làm which ssh-keygen, phiên bản nào của ssh-keygen đang được chạy? Đó có phải là bản sao thích hợp nên được sử dụng/đã được cài đặt bởi Heroku Toolbelt không? Nếu không, có lẽ các bước từ Heroku Managing Keys article không tạo khóa hợp lệ?

3

Tôi có cùng một vấn đề (không phải trên heroku) nhưng trên máy chủ của riêng tôi.

Cố gắng nhìn vào /var/log/auth.log file authorized_keys của tôi đã ownd bởi người sử dụng sai

Các vấn đề liên quan