Questions tagged [ssh-keys]
The ssh-keys tag has no usage guidance.
416
questions
1
vote
0
answers
153
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
18
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
26
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:...
1
vote
1
answer
67
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
1
answer
68
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
0
answers
14
views
Ssh on a VM instance with different people (GCP/Linux)
I am able to ssh into a VM instance and launch scripts with cronjob
Everything works good, set up .ssh/config on local machine:
Host <host_name>
Hostname <ip_adress>
user &...
-1
votes
1
answer
50
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
37
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
...
1
vote
1
answer
100
views
using a known host key with a reverse-tunneled ssh gateway
I'm using reverse tunneling to provide access to an SSH server via ProxyJump, but I'm having trouble getting the client to remember the host public key. Despite indicating it "permanently added ...
0
votes
1
answer
54
views
Purpose of adding ssh identity file to ssh agent and keychain
I noticed that the Github instructions for adding an ssh key to your account say that you need to add the key to both your ~/.ssh/config file AND to the ssh agent with ssh-add
https://docs.github.com/...
3
votes
3
answers
564
views
PowerShell ssh wont stop asking for the password to the key I installed
I'm still being asked for my key password on login from a PowerShell session (Windows 10).
These it turned out are the wrong param:
ssh -o StrictHostKeyChecking=no
or
ssh -o "...
1
vote
1
answer
215
views
SSH with Dropbear: "Permission denied (publickey)"
I've create a RSA key pair with ssh-keygen. In /etc/dropbear-initramfs/authorized_keys I have the public key, and on my client machine I have the keypair in the /home/<name>/.ssh/ directory. ...
0
votes
0
answers
76
views
SFTP with public and private keys
I want to use private and public keys for access to the SFTP server, instead of a username/password mechanism. SFTP server should be available only for a specific user that can log in from whatever IP ...
0
votes
1
answer
362
views
ssh commands in cron jobs on remote server
It is known that cron and ssh-agent do not communicate and hence ssh commands cannot be trivially run under cron. There are solutions involving keychain etc that make it possible to do this. However ...
0
votes
0
answers
19
views
Generate SSH keys for Windows server acting as client
I have an app, which will be run by AutoSys on Windows 2012 server. The app should send csv via SFTP to Linux server. Under which account should I generate SSH keys on the Win12 server?
0
votes
0
answers
244
views
RSA key-pair failing for SSH connection
Password authentication works flawlessly, but I cant get the PubkeyAuthentication to work.
This is what I ran. I added the options to force Pubkey authentication since that is the one that does not ...
0
votes
0
answers
30
views
ssh keys for multiple accounts on one host
I have two accounts on a linux server and would like to have an ssh key for both of them. Do I need to make two keys, so that I can both ssh user1@server.url and ssh user2@server.url without needing ...
0
votes
1
answer
22
views
SSH into Namecheap shared host
I'm trying to connect to my Namecheap shared host server via SSH
I imported the pub/private key and authorized it like so:
Let's VM IP = 11.11.11.11
When I SSH, I kept getting
➜ Desktop ssh webedcwp@...
0
votes
0
answers
103
views
How do you successfully setup SSH so you can connect to the same host from two different clients?
There are a lot of posts about this type of stuff but I haven't been able to find an answer that works for me...
I have an SSH server setup on a Ubuntu machine at home. I was able to setup no password ...
0
votes
0
answers
45
views
Fake Password Entry on SSH Login
I have an SSH server which I would like to be public key authentication only. That's easy enough.
Now I want to make it so that if you are denied access based on public key, the server pretends like ...
0
votes
0
answers
45
views
Renew SSH agent expiration time
Currently, I use this alias alias sshx="ssh-add -t 1h ~/.ssh/id_ed25519" to add my SSH key to the agent. I'd like to know if that it is possible to renew the 1h timer each time I initiate a ...
1
vote
1
answer
327
views
SSH connection with Putty : Server refused our key
I'm having quite a hard time with ssh keys.
To explain the context, I'm trying to ssh my VM (my computer is the client and the VM on it is the server). For now, it works using password authentication ...
0
votes
1
answer
36
views
Authenticate against AD after ssh into Windows Server
Apparently after ssh into a Windows Server with a key-file the (domain) user is logged into the machine - but not authenticated against the AD Active Directory.
So when when log4j tries to write a log-...
0
votes
1
answer
87
views
Script SCP with public key
I need to configure a script to copy some files from one Ubuntu server to another.
The key uses is allowed in the authorized_keys on remote server.
I'm trying to configure this script:
#!/bin/sh
#...
0
votes
1
answer
61
views
ssh hostbased access denied
Under Centos 7 with Selinux disabled, I can't connect through ssh with hostbased authentication.
Server side :
/etc/ssh/sshd_config :
HostbasedAuthentication yes
IgnoreUserKnownHosts yes
...
0
votes
0
answers
139
views
Windows 11 - can't create a public key with SSH-Keygen
I am trying to create a key with ssh-keygen but none of the keys is considered fitting when I try to use in GitHub (unless I am getting it wrong). Posting examples below.
This is my id_rsa file:
-----...
0
votes
1
answer
92
views
ssh connexion : Permission denied (publickey,password)
I'm trying to connect to my server with a ssh connection, so it works when I use FileZilla but not with the command line ssh <login>@<ServerIP> -i /Volumes/ExternalDisk/key.ppk
I have this ...
0
votes
0
answers
126
views
Passwordless ssh reverse tunnel suddenly asks for password?
This has me puzzled to no end, hopefully someone can clarify.
I have a local server, LOCALSRV, and remote server (Ubuntu 20.04), REMOTESRV.
On the local server, I've established a reverse ssh tunnel, ...
0
votes
1
answer
63
views
Over SSH, can you use the same private key on the host side for other purposes?
I'm sat on one computer ('client') and connecting through SSH to another computer ('host') using my private key.
On the host computer, I would like to clone a Git repo using the private key that's ...
0
votes
1
answer
73
views
ssh key sharing fails to connect with public key
I have generated private-public pair of ssh keys using e.g. this. I don't have access to the remote server, so I sent the public key to someone that possess an account there.
The public key was placed ...
0
votes
0
answers
467
views
"Can't find password for connection ID" using SSH key pair to access sFTP
I'm trying to access company's sFTP using ForkLift 3 on MacOS. I created an openSSH key pair using Terminal and the following command:
$ ssh-keygen -t rsa
Inside Terminal I opted to include a ...
0
votes
0
answers
59
views
SSH Login from Termius using HashiCorp Vault's Certificate based Authentication on any Linux Server
Can we able to login to the Linux server with Certificate Based Authentication (which is provided by Hashicorp Vault) through Termius ?
I have a requirement to login through Public key and Private key ...
0
votes
1
answer
79
views
Which ssh public key and private key is my user using?
For what I understand there's needs to be an exchange of keys pairs so an ssh connection takes place. I am practicing remote port forwarding. I am in metasploitable 3 and want to expose the service ...
0
votes
0
answers
19
views
selinux ssh key login
I want to know how to enable and disable ssh key on Ubuntu 20.4 and CentOS 8. On both systems selinux is on Enforcing. On both systems I turn it on or off:
setsebool -P ssh_keysign off
setsebool -P ...
0
votes
1
answer
37
views
Unable to understand precaution for SSH key for Git
I am setting up Git for Github on my ubuntu and decided to do the SSH instead of HTTPS way. So, I am at the step of Creating SSH key (my .ssh folder is empty). Now, I came across this precaution on ...
0
votes
0
answers
77
views
Configuring ssh key access but let other user write into home directory
On Red Hat I configured a specified home directory for a newly created user, e.g.
/files/upload
ssh login is disabled for that user, so /bin/false is setup in its profile since I need the user can ...
0
votes
0
answers
30
views
How to enable GPG key authentication alongside SSH?
At work I use SSH keypairs to access 5x important servers, on a daily basis. Nothing exciting about that. But I've recently been asked to provide a GPG public key in order to access a 6th system, ...
0
votes
1
answer
7k
views
For valid PEM I get unable to load private key by openssh
I have created a public/private key pair with this command:
ssh-keygen -t rsa -b 4096 -f my-trusted-key -C "Just a public/private key"
I can open the private key file and I see:
$ cat my-...
0
votes
0
answers
26
views
SSH Host Keys are different when accessing server from inside and outside the network
I am running a small web server and can SSH using the private ip when I am inside the network. When I am outside the network and I SSH using my public ip the host keys are different for no apparent ...
0
votes
1
answer
768
views
When and how is generated the /etc/ssh/ssh_known_hosts file?
I read the following tutorial
How to use ssh-keyscan on Ubuntu
I confirmed that ssh-keyscan 192.168.1.X scan and prints all the public keys values of the server/host - that output comes from the ...
0
votes
0
answers
39
views
SSH - known_hosts file generation content behavior
When is executed
ssh -i id_rsa_something remoteuser@192.168.1.2
appears:
The authenticity of host '192.168.1.2 (192.168.1.2)' can't be established.
ECDSA key fingerprint is SHA256:ABCABC [fixed/...
0
votes
0
answers
182
views
How use ssh-keygen to show either ECDSA or ecdsa-sha2-nistp256?
When I do:
ssh -i id_rsa_something remoteuser@192.168.1.2
appears:
The authenticity of host '192.168.1.2 (192.168.1.2)' can't be established.
ECDSA key fingerprint is SHA256:ABCABC [fixed/changed].
...
0
votes
1
answer
194
views
How can I add my ssh public key to a Mikrotik router device using the command line?
Mikrotik doesn't support ssh-copy-id which copies ~/.ssh/id_rsa.pub into the .ssh/authorized_keys file of a host on almost all Linux devices.
Is there an equivalent way to authorize a key on a ...
0
votes
0
answers
409
views
ssh: connect to host example port 22: Connection refused
I have given the following command in the terminal:
ssh -L 8080:localhost:8888 bb@example
However, the following error appears:
ssh: connect to host example port 22: Connection refused
I have also ...
0
votes
0
answers
97
views
SSH ask for password on a device with no password
I am trying to access my desktop via my laptop and to do so I setup an ssh server on my desktop. I allowed the firewall and everything. now whenever I try to connect via ssh to the desktop it keeps ...
1
vote
1
answer
1k
views
What causes SSH warning about ED25519 host key mismatch on new servers?
I frequently create and destroy virtual machines, and connect to them via SSH.
Operating system is RedHat Enterprise Linux versions 7 or 8 (happens with both) on both client and server side, and of ...
1
vote
1
answer
704
views
Guacamole ssh login details not correct
So in a previous question I was trying to log into localhost's shell via guacamole. The solution was to enable password authentication for localhost connections in the sshd config.
So I looked at the ...
0
votes
1
answer
379
views
SSH Using YubiKey 5 and ED25519 Algorithm
I am starting to use a YubiKey 5 to ssh into remote boxes instead of using a software key. I am generating the keys using this command:
ssh-keygen -t ed25519-sk
This works when I ssh into Ubuntu, but ...
1
vote
1
answer
271
views
Openssh on Windows server: ssh to localhost is asking for password
So I have installed and configured Openssh on windows server 2016 and now I am trying to setup passwordless connection to localhost because a scripts needs it.
Login to localhost without password is ...
0
votes
1
answer
28
views
Keep terminals open while changing folders
Sometimes I have to go through 30+ projects to make small change to each one and push changes to github repo. Right now I have setup my ssh command in .bash_profile, after entering command I just have ...