# How to set up ssh on nest.pijul.com?

**URL:** <https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589>\
**Category:** Question\
**Created:** [November 12, 2020, 6:50pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589 "2020-11-12T18:50:33Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/rob/32/298_2.png) [@rob](https://discourse.pijul.org/u/rob)\
**Post date:** [November 12, 2020, 6:50pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/1 "2020-11-12T18:50:33Z")

</div>

I’ve been trying to talk to the nest via ssh, with no success so far.

First thing that’s unclear to me is the username; I take it I should be using my nest username, so e.g. `pijul clone robx@nest.pijul.com/pijul/pijul` should work? (I’m a bit unsure because e.g. github has a generic `git@github.com` user for ssh access.)

I believe I configured my public ssh key correctly, but access fails with `Key "id_rsa.pub" (with agent) rejected` (regardless of the username I use), and then prompts me for a password.

Here it seems that I can actually use my nest password, but there seems to be something wrong. Concretely, I’ve seen:

correct password:

```auto
$ pijul clone robx@nest.pijul.com:/robx/testing
Key "id_rsa.pub" (with agent) rejected
Password for robx@nest.pijul.com: 
Error: Remote exited with status 1

```

incorrect password:

```auto
$ pijul clone robx@nest.pijul.com:/robx/testing
Key "id_rsa.pub" (with agent) rejected
Password for robx@nest.pijul.com: 
Error: Not authenticated

```

and then frequently:

```auto
$ pijul clone robx@nest.pijul.com:/robx/testing
Error: Connection reset by peer (os error 54)

```

I should note that in the process of figuring this out, I also tried renaming my account (from robx to rob) to match my local username. I was surprised that the nest allows renaming an account, and not particularly surprised that it didn’t really seem to successfully rename the account. There’s now both [https://nest.pijul.com/rob](https://nest.pijul.com/rob) and [https://nest.pijul.com/robx](https://nest.pijul.com/robx), but I can’t seem to log in to the former.

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [November 12, 2020, 7:03pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/2 "2020-11-12T19:03:16Z")

</div>

You can indeed rename your account, but if the new login name is taken, that won’t succeed.

The syntax you’re looking for is

`pijul clone robx@nest.pijul.com:robx/testing testing`

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [November 12, 2020, 7:04pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/3 "2020-11-12T19:04:11Z")

</div>

I’m super sorry about this, I understand that this may be the only syntax you didn’t try. I’m in the process of rewriting the manual.

---

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/rob/32/298_2.png) [@rob](https://discourse.pijul.org/u/rob)\
**Post date:** [November 12, 2020, 7:09pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/4 "2020-11-12T19:09:44Z")

</div>

Don’t worry, I have an idea how much work this all is. (Particularly dealing with users and not just code.) Everything you do much appreciated, and I don’t mind that things don’t “just work”.

That said, I do seem to be running into the same issues even with the modified command line.

---

<div class="post-metadata">

**Author:** ![emily](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@emily](https://discourse.pijul.org/u/emily)\
**Post date:** [November 12, 2020, 7:46pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/5 "2020-11-12T19:46:33Z")

</div>

When I run `pijul clone emily@nest.pijul.com:emily/hello-pijul testing` it works. I’m using an ed25519 ssh key, but I’m not sure if that makes any difference. For some reason `pijul clone emily@nest.pijul.com:robx/testing testing` crashes though.

Cloning repositories from other users, like `pijul clone emily@nest.pijul.com:pijul/pijul pijul` does seem to work for me. Maybe it doesn’t work for `robx/testing` because it’s an empty repository? Maybe you could try `pijul push robx@nest.pijul.com:robx/testing` from an existing repository.

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [November 12, 2020, 9:12pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/6 "2020-11-12T21:12:02Z")

</div>

> [@rob](#):
>
> Don’t worry, I have an idea how much work this all is. (Particularly dealing with users and not just code.) Everything you do much appreciated, and I don’t mind that things don’t “just work”.

I like to finally be able to deal with users! I’ve worked on that thing for years, frustrating everybody who wanted to try something that wasn’t even close to being remotely usable. I’m happy that the class of errors is down to user experience, extending basic features and the like.

---

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/rob/32/298_2.png) [@rob](https://discourse.pijul.org/u/rob)\
**Post date:** [November 12, 2020, 9:13pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/7 "2020-11-12T21:13:40Z")

</div>

You’re right, I can now clone non-empty repositories via ssh+password. I’m pretty sure I tried non-empty repositories before, but it seems like maybe something got into a bad state due to the failures.

---

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/rob/32/298_2.png) [@rob](https://discourse.pijul.org/u/rob)\
**Post date:** [November 12, 2020, 9:14pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/8 "2020-11-12T21:14:13Z")

</div>

Alright, I’m happy to keep bugging you then until I figure out how to work with this. 🙂

---

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/rob/32/298_2.png) [@rob](https://discourse.pijul.org/u/rob)\
**Post date:** [November 13, 2020, 2:30pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/9 "2020-11-13T14:30:01Z")

</div>

Some progress here. I’ve created a dedicated ed25519 key. I think behaviour can be summarized as follows:

- I have both my default RSA key and ed25519 configured on the nest now; it doesn’t seem to improve things if remove one or the other from nest config
- if I have only the ed25519 key added to ssh-agent, passwordless auth works! (but I still run into `Remote exited with status 1`, even cloning /pijul/pijul)
- if I have only the rsa key added to ssh-agent, I’ve seen `Key "xxxx..." (with agent) rejected` before being prompted for password. Notably, that “xxxx…” string is different from the fingerprint I see in `ssh-add`'s output (but perhaps it’s the private key? it’s not actually “xxxx…”)
- if I have both keys in ssh-agent, I’m prompted for password directly; judging by debug output the keys don’t seem to be tried

I also still see things lock up with `Error: Connection reset by peer (os error 54)` after failures. I can work around that by connecting from a different IP address, so it seems either something breaks on the networking side, or it’s some kind of defensive firewally measure after failed ssh connections.

This is all with a fresh (as of an hour ago) build of pijul, btw. (But no update to thrussh from cargo.)

---

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/rob/32/298_2.png) [@rob](https://discourse.pijul.org/u/rob)\
**Post date:** [November 13, 2020, 2:44pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/10 "2020-11-13T14:44:56Z")

</div>

Having now rebuilt after `cargo update`, which pulled in a new thrussh version, having both keys in ssh-agent now works in the sense that it combines the two single keys: I get the “rejected” message for the RSA key, but then authenticate successfully, presumably using the ed25519 key.

---

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/rob/32/298_2.png) [@rob](https://discourse.pijul.org/u/rob)\
**Post date:** [November 16, 2020, 1:34pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/11 "2020-11-16T13:34:58Z")

</div>

I’ve finally managed to clone via ssh. I might have noticed this earlier from some of your answers, but to repeat for anyone who might run into some of these problems:

The correct form for a nest ssh remote is

> `username@nest.pijul.com:pijul/pijul`

or

> `username@nest.pijul.com/pijul/pijul`

(But not `username@nest.pijul.com:/pijul/pijul` which results in “Remote exited with status 1”. I’ve filed a discussion to improve this error here: [pijul/pijul - Discussion #76 - better error reporting for remote pijul (ssh, missing path)](https://nest.pijul.com/pijul/pijul/discussions/76) .)

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [November 16, 2020, 4:17pm UTC](https://discourse.pijul.org/t/how-to-set-up-ssh-on-nest-pijul-com/589/12 "2020-11-16T16:17:59Z")

</div>

Thanks, for the report, and especially for your perseverance. I think this is as much of a Nest issue as a Pijul one, I’ll look into it as soon as I can.
