# Ssh passwordless login for Connect IT? (public key)

**URL:** <https://forums.digi.com/t/ssh-passwordless-login-for-connect-it-public-key/33294>\
**Category:** Connect IT\
**Tags:** connect-it\
**Created:** [November 27, 2024, 6:53pm UTC](https://forums.digi.com/t/ssh-passwordless-login-for-connect-it-public-key/33294 "2024-11-27T18:53:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fire](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@Fire](https://forums.digi.com/u/Fire)\
**Post date:** [November 27, 2024, 6:53pm UTC](https://forums.digi.com/t/ssh-passwordless-login-for-connect-it-public-key/33294/1 "2024-11-27T18:53:05Z")

</div>

There is a topic regarding the ssh public key for user access with ConnectPort but it didn’t help.

> [@unable to enter SSH public key for user access with ConnectPort TS 16](https://forums.digi.com/t/unable-to-enter-ssh-public-key-for-user-access-with-connectport-ts-16/18535):
>
> In the User Access section under User Configuration, I am attempting to enter an SSH public key. No matter what I try (RSA or DSA, 1024 or 2048 bits, from puttygen or ssh-keygen), I get the “Invalid or missing SSH Public Key” error after pasting the key and pressing Apply. I haven’t found anything online that specifically addresses the ConnectPort devices, but I’ve followed the directions for similar Digi devices (in particular, pasting the entire key text). Suggestions?

I have a Connect IT 4 and I would like to ssh in remotely. Putty kept saying the server refused our key.

I am sure the private key and public key are correct and tried to copy to web and cli.

Any help?

---

<div class="post-metadata">

**Author:** ![michaelt](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/michaelt/32/92_2.png) [@michaelt](https://forums.digi.com/u/michaelt)\
**Post date:** [November 27, 2024, 11:34pm UTC](https://forums.digi.com/t/ssh-passwordless-login-for-connect-it-public-key/33294/2 "2024-11-27T23:34:55Z")

</div>

@Fire , thanks for your web forum post.

Here is a link to where you’ll find this guidance within the Connect IT 4 User Guide (a model which uses a different OS than the ConnectPort, therefore configured differently):

[https://www.digi.com/resources/documentation/digidocs/90002355/default.htm#os/services-ssh-key-auth-t.htm](https://www.digi.com/resources/documentation/digidocs/90002355/default.htm#os/services-ssh-key-auth-t.htm)

Does that work for you?

---

<div class="post-metadata">

**Author:** ![Fire](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@Fire](https://forums.digi.com/u/Fire)\
**Post date:** [November 29, 2024, 7:39pm UTC](https://forums.digi.com/t/ssh-passwordless-login-for-connect-it-public-key/33294/3 "2024-11-29T19:39:24Z")

</div>

Fix:

I was using puttygen to generate the keypair. The public key file generated by puttygen started with the following text:

```auto
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20xxxxxx"
[public key content]
---- END SSH2 PUBLIC KEY ----

```

As I copy the whole text as ssh key, it won’t work.

The correct format which generate under linux is:

`ssh-rsa [public key content]`

Although, the private key file needs to be convert to putty format before putty can accept it.

Modify the ssh content from puttygen also works, just remove all the header/footer other than public key, add ssh-rsa in the front. save the ssh key and you are good to go.

Maybe Digi can add this into new firmware automatically extract the key into the system. Or just put note there, copy public key content only.

Anyway, hope that helps other people.
