Help setting up a remote host


53
views
0
12 days ago by
I followed the instructions (1st using SSH to create the key remotely, and then with PuTTY) and get the following error when probing the remote host:

OpenSSH_7.3p1, OpenSSL 1.0.2j 26 Sep 2016
debug1: Reading configuration data /c/Users/Alex/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 192.168.0.126 [192.168.0.126] port 22.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Alex/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Alex/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Alex/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Alex/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Alex/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Alex/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Alex/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Alex/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1 Debian-10+deb9u1
debug1: match: OpenSSH_7.4p1 Debian-10+deb9u1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.126:22 as 'smartcoin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:mYGSvlz1/eP19p+zmm24Zta05S/2H4wTAdhgNgpvMzg
debug1: read_passphrase: can't open /dev/tty: No such device or address
Host key verification failed.
SSH client exited errno=255

I used pageant to add the keys and Windows cmd connection to the host using plink works fine. I also tried naming them the same as in the tutorial (id_rsa.ppk) and tried root as the login (root@192.168.0.126). Please help.
Community: Wing Python IDE
I'm not sure but t sounds like you generated an ssh key on the remote system and then again on the local system, rather than using the same ssh key pair on both ends.  You need to generate an ssh key and have the private key on the end where Wing is running and the openssh version of the public key on the remote host.

In any case, ssh is asking for a passphrase because it hasn't found a matching public key on the remote system (the errors above list where it looked).   See https://docs.oseems.com/general/application/putty/convert-ppk-to-ssh-key to export a PuttyGen key to openssh format.

Note that if you're logging on as root, then the ssh public key needs to go into root's .ssh folder.
written 12 days ago by Wingware Support  
What is it trying to do when it changes the name of the identity file?

debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file C:/Users/Alex/.ssh/root@doge_rsa.ppk type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:/Users/Alex/.ssh/root@doge_rsa.ppk-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3

root@doge_rsa.ppk is the right key and works with plink and its openssh version works with a remote linux system. Why does it say that the file is not found? And what does the postfix -cert mean? As in root@doge_rsa.ppk-cert, which is then found

By the way, the error that I see on the host side from auth.log is the following:

localhost sshd[6564]: Connection closed by 192.168.0.106 port 51942 [preauth]











written 9 days ago by psionin  
I think root@doge_rsa.ppk is a putty private key and you are using ssh to try to connect to the remote host and it does not know how to read a ppk key.  What is the Network > SSH Executable preference set to in Wing?  If using plink.exe to connect to the remote host works, then start pageant, right click on the icon that appears in lower right of your screen and add your .ppk key, and then change the SSH Executable preference to use plink and not ssh.  Or, if you want to use ssh you need to convert your .ppk key to an openssh key and load that instead into your ssh-agent with ssh-add.  At least I think that is what the problem is... please let me know if this does not help.
written 9 days ago by Wingware Support  
Awesome, that worked! Setting the SSH Executable to plink.exe that is.

However, now there is another error, when installing the remote agent:

The remote agent could not be installed on host id doge01. Timed out. No output was received.

Probing shows this at the end (looks normal):

Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA-256 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA-256 server->client MAC algorithm
Pageant is running. Requesting keys.
Pageant has 1 SSH-2 keys
login as:

Running Debian 9, latest, on the remote machine.
written 2 days ago by psionin  
You may need to specify the Host Name in the remote host config in Wing in username@host_or_ip format so it doesn't ask for a login name for the remote host.  Also be sure to load your private key into Pageant and copy the matching public key into the .ssh/authorized_keys file on the remote host.  There are instructions for doing that here:  https://wingware.com/doc/proj/ssh-setup-details (in the Windows with PuTTY section)
written 2 days ago by Wingware Support  
I set the login name at the front of the host IP and that worked!

Previously I had it set in the Windows .ssh/config file, but since the connection is now going through Plink, it may not be reading it.

That should be it for now, thanks a lot.
written 1 day ago by psionin  
Glad that worked!  Yes, PuTTY is entirely separate from openssh and does not read its config files.
written 1 day ago by Wingware Support  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »