You are not logged in.

#1 2023-01-12 21:27:09

James80
Member
Registered: 2021-01-11
Posts: 10

ssh login saved passphrase

Hi,

when I used linux mint or fedora, when I'd enter '' ssh router'' for the first time, it asked for saved my passphrase but with arch linux, dont have that option for now, do you know if I can do something? Or I need to always put my passphrase to connect router to ssh ?
thanks

```
[james@jimmy-ms7b79 ~]$ ssh router
Enter passphrase for key '/home/james/.ssh/id_ed25519':


BusyBox v1.35.0 (2023-01-06 17:35:56 UTC) built-in shell (ash)

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
-----------------------------------------------------
OpenWrt 22.03-SNAPSHOT, r20031-7c10b7b6f0
-----------------------------------------------------
root@OpenWrt:~# exit
Connection to 192.168.1.1 closed.
```

Offline

#2 2023-01-12 21:29:57

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,606
Website

Re: ssh login saved passphrase


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2023-01-12 21:58:35

James80
Member
Registered: 2021-01-11
Posts: 10

Re: ssh login saved passphrase

thanks

I've already did those steps earlier but don't know if I really need to always retype the passphrase?

'' To make use of these variables, run the command through the eval command. Use ssh-agent -c instead if using the fish shell.

$ eval $(ssh-agent)

Agent pid 2157

Once ssh-agent is running, you will need to add your private key to its cache:

$ ssh-add ~/.ssh/id_ed25519

Enter passphrase for /home/user/.ssh/id_ed25519:
Identity added: /home/user/.ssh/id_ed25519 (/home/user/.ssh/id_ed25519)
''

Offline

#4 2023-01-14 00:20:06

c_alzate
Member
Registered: 2023-01-13
Posts: 3

Re: ssh login saved passphrase

ssh-add only works in the current session.

You can check these solution and choose the best for you https://stackoverflow.com/questions/346 … 7_28040650

If it doesn't work let me know

Offline

#5 2023-01-15 06:28:25

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: ssh login saved passphrase

c_alzate wrote:

ssh-add only works in the current session.

No it doesn't.

c_alzate wrote:

You can check these solution and choose the best for you https://stackoverflow.com/questions/346 … 7_28040650

Please don't recommend external sources when the wiki provides information.

@James80 If you continue with the instructions, you'll see the wiki explains how to get this working at login and as part of your standard configuration. You should not have to keep retyping your passphrase unless too long a time has elapsed (or you've taken some other action which would have invalidated the cached passphrase). I use gpg-agent, but the basic principle is the same: caching means you don't have to keep reentering the passphrase. However, if you're only connecting once a day or something, you would have to because the cached value would presumably have expired. (I assume this is configurable, but you probably don't want the authorisation to persist too long, even if you want to increase the default.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB