I'm having some trouble connecting to my ec2 instance. Here's what's happening:
ssh ec2, I'm prompted if I trust the host key. I input 'yes'.ls and yeah, I'm still local.ssh ec2 again to see if it will work and nothing happens. I see no errors, no messages of any kind.Am I doing it wrong? I guess I expected to be connected after step 4, but I'm not getting anything, not even an error message of any sort.
Hi @j-hannah,
Sorry for late response. Can you post log of ssh -vvvvv ec2?
Having a related issue with both SSH and MOSH. Can鈥檛 connect to any of my 3 instances. Reset known_hosts will go through adding the key but after the handshake I am left back at the Blink command prompt.
Running beta version of Blink on iPadOS 13 Developer Beta 8.
I鈥檓 also having the same exact issue but trying to connect to a DigitalOcean droplet
@Kaihuang724 can you send me output of ssh -vvvvvvv <yourhost> ?
@yury This is the output:
1st blink> ssh remote-server
Ed25519 key fingerprint is SHA256:VXI4RQzuEdYNl6DYvUvpAHk2KNpuLAEbik8fZEYREoI.
The server is unknown.
Do you trust the host key? (yes/no):yes
This new key will be written on disk for further usage.
Do you agree? (yes/no):yes
blink> ssh -vvvvvvv remote-server
ssh_connect: libssh 0.9.0 (c) 2003-2019 Aris Adamantiadis, Andreas Schneider and libssh contributors. Distributed under the LGPL, please refer to COPYING file for information about your rights, using threading threads_pthread
ssh_connect: Socket connecting, now waiting for the callbacks to work
-[IO stream:handleEvent:]: Received POLLOUT in connecting state
socket_callback_connected: Socket connection callback: 1 (0)
ssh_connect: current state : 2
callback_receive_banner: Received banner: SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_client_connection_callback: SSH server banner: SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_analyze_banner: Analyzing banner: SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_analyze_banner: We are talking to an OpenSSH client version: 7.6 (70600)
ssh_known_hosts_read_entries: Failed to open the known_hosts file '/etc/ssh/ssh_known_hosts': No such file or directory
ssh_client_select_hostkeys: Changing host key method to "ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss"
packet_send2: packet: wrote [type=20, len=980, padding_size=10, comp=969, payload=969]
ssh_send_kex: SSH_MSG_KEXINIT sent
ssh_packet_socket_callback: packet: read type 20 [len=1076,padding=6,comp=1069,payload=1069]
ssh_packet_process: Dispatching handler for packet type 20
ssh_kex_select_methods: Negotiated curve25519-sha256,ssh-ed25519,[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],,
packet_send2: packet: wrote [type=30, len=44, padding_size=6, comp=37, payload=37]
ssh_connect: current state : 6
ssh_packet_socket_callback: packet: read type 31 [len=188,padding=8,comp=179,payload=179]
ssh_packet_process: Dispatching handler for packet type 31
packet_send2: packet: wrote [type=21, len=12, padding_size=10, comp=1, payload=1]
crypt_set_algorithms2: Set output algorithm to [email protected]
crypt_set_algorithms2: Set HMAC output algorithm to aead-gcm
crypt_set_algorithms2: Set input algorithm to [email protected]
crypt_set_algorithms2: Set HMAC input algorithm to aead-gcm
ssh_init_rekey_state: Set rekey after 4294967296 blocks
ssh_init_rekey_state: Set rekey after 4294967296 blocks
ssh_packet_client_curve25519_reply: SSH_MSG_NEWKEYS sent
ssh_packet_socket_callback: Processing 196 bytes left in socket buffer
ssh_packet_socket_callback: packet: read type 21 [len=12,padding=10,comp=1,payload=1]
ssh_packet_process: Dispatching handler for packet type 21
ssh_packet_newkeys: Received SSH_MSG_NEWKEYS
ssh_packet_newkeys: Signature verified and valid
ssh_packet_socket_callback: Processing 180 bytes left in socket buffer
ssh_packet_socket_callback: packet: read type 7 [len=160,padding=18,comp=141,payload=141]
ssh_packet_process: Dispatching handler for packet type 7
ssh_packet_ext_info: Received SSH_MSG_EXT_INFO
ssh_packet_ext_info: Follows 1 extensions
ssh_packet_ext_info: Extension: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
ssh_connect: current state : 7
blink: setting socket keepalive: 1
packet_send2: packet: wrote [type=5, len=32, padding_size=14, comp=17, payload=17]
ssh_service_request: Sent SSH_MSG_SERVICE_REQUEST (service ssh-userauth)
ssh_packet_socket_callback: packet: read type 6 [len=32,padding=14,comp=17,payload=17]
ssh_packet_process: Dispatching handler for packet type 6
ssh_packet_service_accept: Received SSH_MSG_SERVICE_ACCEPT
packet_send2: packet: wrote [type=50, len=48, padding_size=12, comp=35, payload=35]
ssh_packet_socket_callback: packet: read type 51 [len=32,padding=16,comp=15,payload=15]
ssh_packet_process: Dispatching handler for packet type 51
ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey
ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey
blink: using auth methods attempt: 1 of 5
blink: import key id_rsa
ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=false
blink: warning: key 'id_rsa' duplicate in SE and file system. Using key from SE
ssh_key_algorithm_allowed: Checking rsa-sha2-512 with list <[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss>
ssh_key_algorithm_allowed: Checking rsa-sha2-512 with list <[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss>
packet_send2: packet: wrote [type=50, len=608, padding_size=11, comp=596, payload=596]
ssh_packet_socket_callback: packet: read type 51 [len=32,padding=16,comp=15,payload=15]
ssh_packet_process: Dispatching handler for packet type 51
ssh_packet_userauth_failure: Access denied for 'publickey'. Authentication that can continue: publickey
ssh_packet_userauth_failure: Access denied for 'publickey'. Authentication that can continue: publickey
@Kaihuang724,
blink: warning: key 'id_rsa' duplicate in SE and file system. Using key from SE
You have id_rsa in config -> keys and in file system ~./ssh. Blink chooses id_rsa from Secure Enclave, but it seems to be wrong key.
I advice you to remove key from file system and import it with config -> keys -> import
This is a known bug though, the ssh session doesn't output errors properly, and it is confusing.
I did get this to work finally.
It seemed like Blink was not adding in my private key correctly, and thus using a different key when trying to connect to the server.
I ended up adding in my key from clipboard by doing this: pbcopy < ~/.ssh/id_rsa
Then going to the Blink app, config, then Add key from clipboard. This seemed to work and I was able to mosh into my server.
Hope this helps. And I agree, there needs to be better error output when connection fails.
Most helpful comment
I did get this to work finally.
It seemed like Blink was not adding in my private key correctly, and thus using a different key when trying to connect to the server.
I ended up adding in my key from clipboard by doing this:
pbcopy < ~/.ssh/id_rsaThen going to the Blink app, config, then
Add key from clipboard. This seemed to work and I was able tomoshinto my server.Hope this helps. And I agree, there needs to be better error output when connection fails.