Ssh/putty/pageant

hi,

Ive always used windows in my life, and about router, I used ssh putty with pageant to save my rsa keys to login automaticaly but now Im on ubuntu, I installed putty but cant find pageant to save my keys?
idea??
thanks

1 Like

Well ubuntu does SSH by "itself". Your ssh keys are stroed in ~/.ssh/

1 Like

You don't need to install that as OpenSSH client should be preinstalled by default:
https://openwrt.org/docs/guide-quick-start/sshadministration#linux_terminal_emulators

And SSH agent should be already running as a part of GNOME keyring:
https://wiki.archlinux.org/index.php/GNOME/Keyring#SSH_keys

3 Likes

thanks for your replies, but I prefer putty and I installed it but when IM connecting it always asks me my ''passphrase'' as I said, usualy, my keys are in '' putty pageant'' so the authentification is ''auto''.
btw, I tried the ubuntu terminal to connect to router but I m not using ''port 22'' on my routers, and the terminal is on ''port 22'' and dont know to change it, ? when I try sudo vim /etc/ssh/sshd_config or or with nano, there is nothing in it, neither here /etc/ssh/sshd_config
thanks

ssh -p port user@host

See also:

That's unfortunate.
There's typically no reason to use PuTTY on a modern Linux desktop.
Moreover, you will likely be missing DE and SSH/SFTP integration.

1 Like
$ ssh -p x348xx root@192.168.1.1
The authenticity of host '[192.168.1.1]:x48xx ([192.168.1.1]:xxxxx)' can't be established.
ED25519 key fingerprint is SHA256:jyHXCQvxxxxxxxxxxxxxxxxxxxxxxxxGKH4.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[192.168.1.1]:xxxxxx' (ED25519) to the list of known hosts.
root@192.168.1.1: Permission denied (publickey).

I got that..

You have disabled password authentication on the server.
Set up the keys on the client properly and try again.

yes cause usualy I use pageant, it is what I try to use again, in your case, you use pssword or passphrase every time?

The passphrase is stored by GNOME keyring and the keyring is unlocked automatically with the password used to log in the session by default, but you can change it as you want.

ok, I think I need to setup GNOME, I use the linux terminal but it seems that I dont have any passphrase saved yet

1 Like

create or edit on your pc vi ~/.ssh/config and place your key in ~/.ssh/id_localrouter for example

~/.ssh/config

Host router
HostName 192.168.1.1
    Port 22
    User root
    IdentityFile ~/.ssh/id_localrouter
    PubkeyAcceptedKeyTypes +ssh-rsa
1 Like

You can install Seahorse for easier passphrase and key management:
https://en.wikipedia.org/wiki/Seahorse_(software)

See also Dropbear key-based authentication:
https://openwrt.org/docs/guide-user/security/dropbear.public-key.auth

1 Like

can I use the Ed25519 keys?

It should work on snapshots and custom image/package builds:

Or you can replace Dropbear with OpenSSH server to use it on OpenWrt 19.07.*.

don't know.. i'm to lazy to update my keys and this:

PubkeyAcceptedKeyTypes +ssh-rsa

is just an option for fedora 33 to accept my keys..my dropnear is not exposed to the internet so i should be ok :wink:

btw, like I do with scp to access my router, how we access the same for linux?

weird..
I ve installed winscp on my ubuntu with wine, same with putty, scp asked me my passphrase, entered it and im fine, but in putty, asked me same thing and say wrong passphrase lol...
tried 10x.. nothing to do, winscp and putty it is the same thing....

putty

i enable password and even with that..

ssh 192.168.1.1 -p 3XXX9
ninjanoir@192.168.1.1's password: 
Permission denied, please try again.
ninjanoir@192.168.1.1's password: 
Permission denied, please try again.
ninjanoir@192.168.1.1's password: 

umask go=
mkdir -p ~/.ssh
tee -a ~/.ssh/config << EOF
Host openwrt
    HostName 192.168.1.1
    Port 3XXX9
    User root
EOF
ssh openwrt

.....
I dont know why.....

I did the script =

ninjanoir:~$ umask go=
ninjanoir:~$ mkdir -p ~/.ssh
ninjanoir:~$ tee -a ~/.ssh/config << EOF
> Host openwrt
>     HostName 192.168.1.1
>     Port 3XXXX
>     User root
> EOF
Host openwrt
    HostName 192.168.1.1
    Port 34889
    User root
ninjanoir:~$ ssh openwrt
root@192.168.1.1's password: 
Permission denied, please try again.

and I guess, nothing to do with it, but in my linux terminal, if I do that .

$ ssh localhost
ssh: connect to host localhost port 22: Connection refused

the terminal linux and my router are two different things but should I have my terminal working on port 22?