Questions tagged [ssh]

Secure Shell (SSH) is a protocol primarily for encrypted shell connections. This tag is also used for questions about sshd and openssh, the two standard applications for using SSH.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

Unable to Connect via Port Knocking on Specific Port

I am trying to set up port knocking on my server to enhance security. I've configured my firewall rules to use port knocking, where I have to connect to specific ports in a specific sequence before ...
0 votes
1 answer
48 views

Debian 12 Bookworm running OpenSSH_9.2 only allows rsa-sha2-512, rsa-sha2-256 and ssh-rsa server host key algorithms

On a Debian 12 Bookworm (running OpenSSH_9.2), which was recently upgraded from Debian 11, only the rsa-sha2-512, rsa-sha2-256 server host key algorithms are available by default. Setting ...
0 votes
1 answer
27 views

Even if SSH is set up, it always asks for the password when logging into the server

I have an Ubuntu server. I use ssh to access it. It worked fine at first. When user@IP is given along with SSH key, it will log into the server without asking for password. But recently, even with SSH,...
3 votes
5 answers
1k views

Why is rsnapshot claiming source directory doesn't exist?

I'm trying to set up a backup system using rsnapshot which will copy files from a remote location into a local one. I've got rsnapshot set up, as far as I can see correctly, but when I run rsnapshot ...
0 votes
1 answer
26 views

ssh prompts for password despite gcr-ssh-agent

I'm trying to set up GNOME-Keyring such that when it is unlocked after login, it will also allow me to use my SSH key, which is encrypted. This is a Debian 12 system. The key in question is an ed25519 ...
0 votes
0 answers
17 views

SSH certificates: how to revoke a certificate serial number on the client side? [closed]

Found so many resources about KRLs on the server but not the client. Any help?
1 vote
4 answers
4k views

Use a different password for SSH access from local login

Unfortunately, not all (client) software that supports SSH/SFTP supports publickey authentication. How would one set up a standard Ubuntu desktop (with sshd enabled) so that you could use an easy ...
0 votes
1 answer
34 views

Cannot setup ssh(dropbear) key login

Dropbear config is /etc/config/dropbear: config dropbear option Port '22' option Interface 'lan' option RootPasswordAuth 'off' option PasswordAuth 'on' I've paste my public ssh key ...
1 vote
2 answers
17k views

Could not chdir to home directory /home/Me: No such file or directory

On a daily basis, I interact with 10s of productions servers which do not, and should not have a home directory for my personal user. Every SSH session is met with the same error message: Could not ...
-1 votes
1 answer
39 views

How can I get SSH to work?

My pc is running Lubuntu 20.04. I am trying to ssh to a raspberry pi 4 running Ubuntu Server 22.04. I have followed the setup instructions but see the following: ssh -v [email protected] OpenSSH_8....
0 votes
1 answer
77 views

How to get the IP address of the host that i have ssh'ed into?

I have ssh'ed into a linux host with ssh username@ip. Once logged on, how do I get the IP address of the host? commands such as host name -I or ifconfig are returning an IP address that are different ...
1 vote
2 answers
85 views

Linux server: apt-get update "Could not get lock" error

I have a Google Cloud machine. Every few days, I SSH into the VM and run a handful of commands. Over the past few days, whenever I run sudo apt-get update, I get the following errors: E: Could not get ...
0 votes
2 answers
3k views

MySQL 8.0.20 via SSH

DBeaver 7.1.0 on Windows 10 trying to connect to MySQL 8.0.20 on Ubuntu 20.04 using SSH. I also tried other Windows MySQL GUI clients, with the identical results, which leads me to believe the problem ...
2 votes
0 answers
42 views

STIG'd RedHat 8 kills tmux session upon SSH timeout

I am working on a Red Hat Enterprise Linux (RHEL) 8 machine with the DISA STIG applied via OpenSCAP. The STIG requires that users be automatically dropped into a tmux session, that tmux session locks ...
0 votes
1 answer
32 views

Why are remote connections to my ssh tunnel refused but local connections are accepted?

Hello I have set up an ssh tunnel as follows:  /usr/bin/ssh -vvv -o ServerAliveInterval=10 -o ServerAliveCountMax=3 -R 15000:127.0.0.1: 15000 -N mylinode.domain.com ... debug1: Offering public key: /...
1 vote
2 answers
4k views

permission denied publickey using rsync with GCP

I'm trying to connect with rsync to a GCP vm. Whenever I do, I'm getting weird errors related to permissions. I've checked that my username is part of the sudoers group so I can't really see where ...
0 votes
1 answer
2k views

Unit sshd.service not found

Good morning to all, I've a problem with ssh. I'm using Ubuntu 23.10, new installation. I've installed openssh-server via sudo apt install openssh-server However, when I try to use something related ...
0 votes
1 answer
6k views

User can access to only one directory with scp

I want to create a user for my Ubuntu server. I will use this user to copy some files from server to my local computer. So permissions should be really limited. This user can only reach to /some/path ...
0 votes
0 answers
75 views

execute ssh with command su and keep log in

I have a server where I have 2 users, one for ssh access and the other one for command execution, I want to create a command that use ssh, the su command and I want to keep the session alive, I try ...
146 votes
35 answers
567k views

SSH Suddenly returning Invalid format

So a while ago I set up a server on AWS, and used their generated SSH key. I saved the key to Lastpass, and have successfully retrieved it from there before, and got it working. However, after trying ...
0 votes
1 answer
18 views

Understand SSH AgentForwarding per Host specification

Disclaimer: originally I asked this question on StackOverflow and it was legitimately marked off-topic and think it fits better here. In the meantime I found the problem (see intermediate solution ...
18 votes
1 answer
87k views

Connection closed by UNKNOWN port 65535 when SSH using AD Creds on RHEL Machine

Recently I installed PAM & all the necessary packages needed to enable ssh authentication via AD on my RHEL 7.5 machines. When I try to SSH using "ssh user@domainname@hostname" it asks ...
0 votes
0 answers
34 views

Strange issue with firewalld and ssh on Almalinux 9

I have this strange issue with firewalld and ssh on my fresh AlmaLinux 9 installation. I changed the ssh port to a non-default port(9322), restarted the sshd daemon. Firewalld is running in it's ...
0 votes
1 answer
860 views

SSH Connection Issue: ssh -o MACs=hmac-sha2-256 works, but ssh without options doesn't

I have encountered a perplexing issue with my SSH connection. When I use the command ssh -o MACs=hmac-sha2-256 172.16.221.246, the connection works perfectly fine. However, when I try to connect with ...
0 votes
1 answer
57 views

Ssh hang after execute some command

I run some command through ssh: ssh root@remote "SOME_COMMAND", but the ssh does not return after command done. It just hang there. The client side ssh log: debug3: receive packet: type 98 ...
0 votes
1 answer
113 views

SSH through squid proxy running on the same server

I am currently connecting to my server over ssh. I also have a squid proxy running on the same server, and I would like to be able to connect to ssh through the proxy, presumably with ssh taking place ...
2 votes
1 answer
43k views

-bash: ansible-playbook: command not found

Fresh Fedora Server Netinstall. Updated. Installed only Git and Ansible latest versions from standard repo. Want to execute Ansible against it's own host (localhost) to set up its host itself (not ...
1 vote
1 answer
344 views

Why does WinSCP connect to /root and nothing else, through OpenSSH?

We set up an Amazon EC2 instance and managed to WinSCP into it by setting up WinSSHD on the server. As WinSSHD is commercial, we were looking for a free alternative and opted to try OpenSSH, which I ...
0 votes
0 answers
8 views

What configuration is blocking local ssh connections to my server? [migrated]

So I recently bought a Raspberry Pi to work on a small passion project with the RetroPie Debian-based image. I am now at the stage where I want to completely shield the server only allowing specific ...
0 votes
0 answers
36 views

AWS EC2 Ubuntu 22.04 LTS session timeout not working (ClientAliveInterval, ClientAliveCountMax)

I installed an AWS EC2 instance using Ubuntu: ubuntu@ip-aaa-bbb-ccc-ddd:~$ lsb_release -ds Ubuntu 22.04.3 LTS I was using the following simple tutorials to set the ClientAliveInterval and ...
0 votes
0 answers
44 views

Can't run startup script on Debian VM in Google Cloud - SSH and Serial Console Access Issues

I've been struggling for days with a SSH access problem on my Compute Engine VM (Debian GNU/Linux 10), with an error in the sshd_config file leading to the inability to restart the SSH service: 2024-...
0 votes
1 answer
4k views

`Bad stdio forwarding specification '%h:%p'` appears by ssh option but it does not appear by ~/.ssh/config

I wrote forwarding settings below in~/.ssh/config and ssh destination works well (successfully logged in to destination): Host gateway User ikuwow Hostname gateway.example.com Host destination ...
-1 votes
1 answer
29 views

SAP external command using lftp over sftp

I need to connect to the EDI server and pick up the data via sftp. This is an unusual ftp server. This is a special server that erases files after reading. We dismissed the initial idea of mounting ...
0 votes
0 answers
12 views

When using the GCP OS Login TRUE, is it possible to access SSH from outside through Putty or VSCODE? How?

As I understood that, If I enable the GCP OS Login for the project, the normal behavior to SSH using public keys in metadata will cease to work. I am curious about the SSH connection method using an ...
23 votes
5 answers
92k views

SSH Public Key Format

I have a public key in the format: ---- BEGIN SSH2 PUBLIC KEY ---- Comment: "somename-20060227" AAAAB3NzaC1yc2EAAAABJQAAAIBmhLUTJiP[and so on]== ---- END SSH2 PUBLIC KEY ---- Usually I see keys in ...
0 votes
0 answers
32 views

Unreasonably slow SSH tunnel - but just in the opposite direction

While setting up rsync to a remote computer, I realized that syncing from my laptop the remote was fast, but the opposite was slow. After some debugging and iperf3, I figured that this only happens ...
6 votes
9 answers
76k views

Cannot ssh into cisco switch: Invalid key length

For some reason I cannot ssh into a Cisco Catalyst C3750 Switch. This is the error message, that I get: ssh_dispatch_run_fatal: Connection to 192.168.7.6 port 22: Invalid key length This is the ...
3 votes
3 answers
7k views

"ssh_exchange_identification: read: Connection reset by peer" error trying to connect to OpenSSH on Windows machine

I'm trying to set up an SSH server on my Windows2k8 server. I used the instructions found here. Here's the verbose output: steves-air:~ steve$ ssh [email protected] -v OpenSSH_7.9p1, LibreSSL 2.7.3 ...
1 vote
1 answer
92 views

OpenSSH server limit local forwarding to only unix sockets

Problem: Limit SSH -L forwarding only to unix sockets SSH server S is a shared server inside a private network used by several users. Use-case: for each user I create a local unix socket to use to ...
54 votes
7 answers
23k views

How to get all fingerprints for .ssh/authorized_keys(2) file

Is there a simple way to get a list of all fingerprints entered in the .ssh/authorized_keys || .ssh/authorized_keys2 file? ssh-keygen -l -f .ssh/authorized_keys will only return fingerprint of ...
0 votes
1 answer
152 views

Cannot ssh into my vps ipv6 ip : Network is unreachable

The dashboard of my hosting company regxa provides me with a root password and ipv6 address to my CentOS server, no ipv4 I have tried using both putty and ssh cmd in my linux machine to connect to the ...
0 votes
1 answer
33 views

No SSH access to EC2 instance launched by ASG, while I can access an otherwise identical instance

I'm trying to SSH to an EC2 instance that's part of an ASG associated with an ECS service. To help narrow down the problem, I created new instance from the same launch template. I've carefully ...
0 votes
0 answers
62 views

git-lfs is giving me a "locking API" error when I try to push to the server

I am trying to enable git lfs on my server but it's not working. The server is already hosting git repositories which is working fine. The server is runnign Debian bookworm. What I did on the server: $...
88 votes
12 answers
109k views

protocol version mismatch -- is your shell clean?

When following the instructions to do rsync backups given here: http://troy.jdmz.net/rsync/index.html I get the error "protocol version mismatch -- is your shell clean?" I read somewhere ...
0 votes
2 answers
148 views

GNU Rush invalid uid

I'm trying to configure Rush for limited shell and scp access to a server I have. I am using Rush 2.3, fresh compiled. And the default config they have in their docs. Still, everytime I try to run a ...
4 votes
2 answers
1k views

Piping SSH to wireshark on windows

In my day-to-day operations, I frequently need to execute tcpdump's on remote servers, and it's a pain to save the output to a file and then have to move the file to my laptop to analyze it on ...
558 votes
33 answers
1.2m views

How do I tell Git for Windows where to find my private RSA key?

My Git setup runs fine on Linux, but when I try to set things up under Windows (using Git for Windows and TortoiseGit), I don't know where to put my private SSH key (or, better still, how to tell ssh ...
5 votes
2 answers
9k views

How to change SSH key on Google Cloud?

I need to replace the existing SSH key with a new one, but I don't see such options in Cloud admin panel. What is the right way to do this?
0 votes
0 answers
79 views

Running ssh-add in bash with both the key and passphrase as arguments

I am trying to run ssh-add by bash script on Alma9 server with restrictions. The RSA key 4096 is on an SMB share so the file has broken permissions and the key is protected by a passphrase. As the ...
1 vote
1 answer
1k views

How to restrict a user to rbash when logging in via SSH

I would like to restrict some users on my server to only being able to execute certain commands. To do this, the most common approach that I could find is to use rbash. While I can find many websites ...

1
2 3 4 5
180