Questions tagged [ssh-keys]
The ssh-keys tag has no usage guidance.
452
questions
0
votes
1
answer
57
views
sshd_config seems to ignore AuthorizedKeysFile directive
I wan to stop users using ssh-copy-id to a server
In my sshd_config I have set
AuthorizedKeysFile /etc/ssh/global_authorized_keys
I confirm it has been read by sshd -T | grep -i authorizedkey
...
2
votes
1
answer
124
views
Yubikey ssh authentication fails with "signing failed for ECDSA-SK"
I have a Yubikey (Security Key NFC by Yubico) that I'm trying to set up on a Linux machine for SSH authentication in Discoverable keys mode. I've followed this tutorial and created the keys with
ssh-...
1
vote
1
answer
64
views
Cannot restart SSH after adding host entry in sshd_config
What am I doing wrong?
I added within /etc/ssh/sshd_config:
Host myserver
HostName xxx.xxx.xxx.xxx
User myuser
Port 22
When I try to restart sshd, I receive error:
$ sudo systemctl ...
0
votes
1
answer
79
views
Unable to connect to server as root via ssh
I want to use remote explorer in VS Code on Windows to access a server from Ubuntu.
Entering a password all the time is annoying, so I tried generating an ssh key using ssh-keygen. The key works fine ...
-2
votes
1
answer
29
views
Passwordless SSH - no luck
Need to get passwordless SSH access from my Macbook (client) to Ubuntu 22.04 server (server).
ssh_config on client and sshd_config on server remains original
All steps made on client:
Create key (no ...
2
votes
1
answer
189
views
Do I need two ssh keys for one account with two emails (work and personal)?
Here's my situation:
I have one GitHub account. It was always my personal account, with my personal email. Recently my company switched to GitHub and I decided to use the same account (it was allowed, ...
0
votes
0
answers
135
views
Converting putty private key to openssh format causing Invalid key length failure
I've a putty generated keypair file from which I try to save the private key in openssh format with:
puttygen -O private-openssh privat.ppk -o privat.pem
But when I try to use the private key for ...
0
votes
1
answer
41
views
How to securely permission SSH keys on my mac so they require sudo access to both use and copy
I would like to set the permissions/owner settings for the SSH keys so they require sudo access to both use and copy. This would just be an additional security step if someone were to steal my laptop ...
3
votes
1
answer
240
views
how to move ssh-key related files to another directory?
i've been trying to clean up my root directory so that it isn't clustered with random dotfiles. nonetheless, on setting up the ssh-key i came to a dead-end, where i wouldn't find a way to migrate ...
0
votes
1
answer
30
views
What do ssh-keygen flags -N "" -q do?
I am following the tutorial where OP creates ssh keypair for guest VM login as ubuntu
ssh-keygen -t rsa -b 4096 -f id_rsa -C mycurrentfolder -N "" -q
what -N "" -q is really doing?...
0
votes
0
answers
20
views
Ubuntu initial account can NOT log by public keys
I tried to ssh logging from my Win10 client to Ubuntu server without annoying password input.
So I configure my Win10 client as this official link said.
And here is my 2 accounts:
1.The initial ...
2
votes
1
answer
168
views
PEM formatted SSH cert with RFC 4716 format keys
I am trying to get a ssh cert for sftp setup with 3rd party vendor in pem format and should be SSH2, using RSA algo with the Key lengths of 2048.
Do the below steps make some sense (Please correct me ...
0
votes
1
answer
283
views
Why does SFTP prompt for a password when trying to connect to azure storage that should only accept RSA keys?
When I try to make an SFTP connection to an azure storage account using RSA keys azure still prompts me for a password. This problem occurs only on my laptop which is running Ubuntu 22.04.02 LTS on ...
2
votes
0
answers
59
views
use rsync with autossh
I'm trying to use rsync with autossh on my laptop, so it can also work when internet connection is less reliable, but it doesn't really do as I'd like it to do.
The starting point is that I have an ...
0
votes
1
answer
707
views
MobaXterm issue using Private Key for SSH access to Linux server (from Win11 workstation): "bin" folder is open in another program
Issue seemed to start after adding my private key for the SSH session:
SSH pub key (rsa_id.pub) does not work with MobaXterm but works with PowerShell and other apps
This happens whenever I start ...
0
votes
1
answer
932
views
SSH pub key (rsa_id.pub) does not work with MobaXterm but works with PowerShell and other apps
I used PowerShell to create a SSH key like so:
ssh-keygen.exe
# Enter to accept all default + blank PW
# Saved in C:\users\me\.ssh\id_rsa.pub
I can SSH to my server via PowerShell and it works as ...
0
votes
1
answer
47
views
Unknown reason why cannot get ssh access via public keys anymore
Server 1 -> Centos 7.
Server 2 -> AlmaLinux 9.
By mistake I
rsync -e “ssh…” /dir1/ user2@domain2:/home/user2/dir2/
instead of
rsync -e “ssh…” /dir1 user2@domain2:/home/user2/dir2/
The final ...
0
votes
2
answers
8k
views
How to generate rsa-sha2-256 keys using ssh-keygen utility?
I want to generate rsa-sha2-256 ssh key pair using ssh-keygen utility. Can you please share the command for the same?
For ssh-rsa, it's ssh-keygen -t rsa
0
votes
1
answer
507
views
Why am we still getting "Provided host key does not match remote server's fingerprint." in Netsuite when the host key sent matches that of the host?
We are encountering an error in Netsuite where despite the host key being inputted in Netsuite matching that of the server we're connecting to, Netsuite continues to error that the:
"Provided ...
1
vote
0
answers
126
views
SSH into windows 10 pc with Termux using keypair
So i want to SSH into my windows 10 pc via termux
On server windoes 10 pc:
1.)installed OpenSSH using optional windows features.
2.)enabled the respective services
On client termux app:
-generated ...
0
votes
0
answers
55
views
Windows SSH-Server is only reading first line from "authorized_keys" file
I am trying to SSH from Ubuntu(WSL) to Windows but the OpenSSH-Server on Windows seems to be reading only the first line of authorized_keys file.
When I put the SSH-Key I use to SSH from Ubuntu to ...
0
votes
0
answers
117
views
Please help trying to Generate sshkey Saving key "~/.ssh/id_rsa" failed: No such file or directory
So I have done this before, but for some reason after I factory reset my computer it fails to work. I followed directions. I first created a file named it CIS117KEY. Then opened a terminal. Per my ...
0
votes
1
answer
177
views
Log in with either a password or a public key. But not both at the same time, and limit the PAM authentication to the root user
I am having difficulties configuring the ssh server. The scenario is as follows. The root user is the only one using google F2A (PAM), the restricted user only connects by password and the rest of the ...
0
votes
1
answer
265
views
SSH key does not save permanently
Everytime my laptop connect to company's wifi, and committing/fetching something, git always pops error permission denied so I have to add the ssh key. The problem is that it doesn't effect ...
1
vote
1
answer
58
views
How to debug ssh connection to remote user (when connection to root works fine)
I have an Xubuntu "Caller" and Fedora "Callee" in my garage. I'm setting them up to connect via SSH. Both are running OpenSSH, so the configurations are similar.
I can connect as ...
1
vote
2
answers
1k
views
How to disable RSA and ECDSA keys in openssh-server on Fedora Linux
I read that RSA and EDCSA algorithms are inferior to Ed25519 in terms of speed and space, and for my small Beowulf cluster, I'd like to just use Ed25519. However, when I try to remove, truncate, or ...
0
votes
1
answer
809
views
SSH-Keyscan Does Not Return a Key
I am trying to retrieve the ssh key from a Cisco Switch and get the following output:
[root@localhost] ssh-keyscan -T15 172.20.10.11
# 172.20.10.11:22 SSH-2.0-Cisco-1.25
# 172.20.10.11:22 SSH-2.0-...
1
vote
1
answer
98
views
Trying to setup SSH key pair for root
Setting up SSH keys for root (technically ed25519 keys). Created the key pair on server I want to logon FROM and put the pub key onto the authorized key file of the server I want to connect TO.
I can ...
0
votes
0
answers
54
views
GIT SSH keys gets "forgotten" the next day, sometimes
We use DevOps as git repository and I use Git GUI to generate an SSH key.
I've used DevOps months without any issues, but as of recently, I've started to notice that my SSH key get's invalidated or ...
1
vote
0
answers
269
views
SFTP connection hangs on "SSH2_MSG_KEXINIT sent"
I am struggling to connect via SFTP to my AWS test account from my on-prem server.
When I cd into the directory where my private ssh-key and run sftp -v -i <private_key_file> <client>@<...
1
vote
0
answers
226
views
OpenSSH sshd.exe does not start with KexAlgorithms parameter
Running OpenSSH Server 8.1p on Windows Server 2016 DC
When I add the parameter "KexAlgorithms" in the sshd_config, the service fails to start. I want to add legacy support for key methods ...
1
vote
1
answer
166
views
How can I use a U2F hardware authenticator to unlock a SSH key in a computer I am SSH'd into?
I have a number of computers on which I've generated a ed25519-sk SSH key all using the same U2F hardware authenticator (yubikey 5C NFC). I'm now in a situation involving three computers: X, Y, and Z. ...
0
votes
2
answers
177
views
How to use OPENSSH private key to access server?
I received a private key in plain text format from someone. How do I save it to access server. It's in a format mentioned below.
-----FOR SERVER! BEGIN OPENSSH PRIVATE KEY-----
...
0
votes
1
answer
2k
views
Ubuntu Connection closed by [preauth]
I have Ubuntu running on Windows (app) where I have created ssh key pair and added to Ubuntu server (Cloud) for the user.
Whenever I try to ssh from Ubuntu Sandbox (Windows) to ubuntu server (Cloud), ...
0
votes
0
answers
2k
views
Need help wth error 'Permission denied (publickey,password)'
i am trying to ssh to a remote instance and i keep getting Permission denied (publickey,password) error. What is weird is that i am able to ssh into instance-01. I have pasted the verbose logs , would ...
0
votes
1
answer
53
views
Can you use a private key on another host?
I am trying to clarify if an ssh keypair is secure in the sense that it can't be copied to another computer and utilized for a remote account. I thought they were machine specific and could not be ...
1
vote
0
answers
699
views
ssh login failed with public key
I use publickey to do ssh login and failed. Here is my sshd config, sshd logs.
sshd config:
Port 1046
Protocol 2
PermitRootLogin no
ChallengeResponseAuthentication no
PasswordAuthentication no
...
0
votes
2
answers
41
views
ssh keys: which is for whom and where are they supposed to be?
Having read about SSH key generation and installation, I am very confused by the idea, which I might have mistakenly gathered from all of the information: it is that a private key leaves the system on ...
0
votes
0
answers
382
views
How can I connect to my SSH on DigitalOcean droplet? permission denied. (git bash Windows)
How can I connect to my droplet in DigitalOcean using the openssh to be able to install my SSL Certificate, I've already added my SSH key to the droplet and my fingerprint is there, but each time I ...
-1
votes
1
answer
499
views
Can't remove old SSH keys from connection Mac OS
Every time I connect via SSH, the agent will try non-existent keys:
debug1: Will attempt key: /Users/user/.ssh/id_rsa
debug1: Will attempt key: /Users/user/.ssh/id_dsa
debug1: Will attempt key: /...
3
votes
2
answers
10k
views
How to SSH from MacOS terminal to Ubuntu 22.04. No matching host key type found
I'm not able to login to Ubuntu 22.04 which I newly installed from MacOS terminal.
Here is the error I get while trying to SSH to ubuntu
QWERTY-M-91FL:~ qwerty$ ssh [email protected]
Unable to ...
2
votes
0
answers
3k
views
Why am I getting a bad signature for RSA key error with Rysnc crontab between Linux and macOS?
I'm trying to Rsync backups into another machine on a LAN. I've copied my key over and even using SSH manually, I get the following error, which keeps my crontabs from connecting:
...
0
votes
1
answer
1k
views
OpenSSH Won't Authenticate with Keypair
Problem
When I try configuring key pair authentication to OpenSSH-Server running on Ubuntu, I am still prompted for a password.
I've generated key pairs with ssh-keygen -t rsa and did not set a key ...
2
votes
0
answers
3k
views
Permission denied (publickey). On Windows Subsystem for Linux
I am new to SSH and have been looking for a solution for this for long now.
I am trying to connect to my uni's server that runs on Ubuntu from my WSL (I am using wsl2) via ssh. My Subsystem also runs ...
0
votes
0
answers
22
views
Securest way to work with a remote GitHub repo on a multiuser Linux server
I'am currently working on a multi-user Linux server where i have a non sudo user. Also I have a GitHub account where I have a private Repo. Now I want to work with this repo remotely from the Linux ...
0
votes
1
answer
43
views
ssh_config auto restored after some time
I need to connect to git using an ed25519 SSH key, but the /etc/ssh/ssh_config only has the entries below for IdentityFile, so I receive error Permission denied (publickey) when accessing the git repo:...
0
votes
1
answer
699
views
GCP SSH keys add in console gives sudo user access, how can we avoid it?
There are two answers to my questions one is here and the other one is here. None of them answers my question. In here @John Hanley suggested me to add a user and put the public key manually in .ssh/...
1
vote
2
answers
2k
views
Cannot SSH to CentOS 7 even though I have the correct public key: "Permission denied (publickey)."
I am trying to setup SSH key authentication between two Linux servers: ServerA (RHEL) to SeverB (CentOS, the target). I have both files on my :
-rw-------. 1 root root 1679 May 23 14:55 ...
0
votes
1
answer
752
views
Generating keypair for backend issuing JWT token
I need to generate a keypair for my backend to issue JWT token. I am using MacOS.
I tried on terminal:
ssh-keygen -t rsa
and path to /Users/john.brk/my_rsa.
It generates my_rsa and my_rsa.pub.
When ...
-3
votes
1
answer
216
views
Use ssh-keygen on windows machine and use it on linux machine
We have a scenario when we need to generate ssh key with ssh-keygen on a windows machine and copy it to linux instance:
echo -e 'y\n' | ssh-keygen -t rsa -f /tmp/temp -N '' >/dev/null 2>&1
...