All Questions
3,548
questions
0
votes
0
answers
19
views
Sending Environment Variables via SCP
I'm looking to send some kind of environment variable using "SCP -o" (or any other file transfer protocol for that matter PSFTP, PSCP, etc).
I currently use SCP to transfer files between ...
1
vote
1
answer
30
views
SSH from A through B to C, using private key on B
Schematic:
ssh ssh
A ------> B ------> C
^ ^
using A's using B's
ssh key ssh key
Preconditions:
A is running ssh-agent
A can access B
B can access C
A can't ...
1
vote
0
answers
18
views
Hotspot connection SSH / Ping
I have a singleboard computer (Rock 4 SE) with a wifi that is hotspot capable. It is running linux Debian. I want to SSH into it with my laptop using the linux machines own wifi as a hotspot for ...
0
votes
1
answer
13
views
Having JetBrains WebStorm open regularly kills screen session in PuTTY
I have a very odd and very frustrating issue.
Summary
I have my Linux environment set up to automatically reconnect to any existing screen session on log in, which when combined with the WebStorm IDE ...
1
vote
0
answers
46
views
ssh-connection from outside (and inside) fails -- Linux Mint
PROBLEM
no ssh connection to my local computer possible, even not ssh [myname]:127.0.0.1
ssh localhost, on the other hand, works
entering sshd: ALL and ssh: ALL in /etc/hosts.allow does not help
...
1
vote
0
answers
84
views
Incorrect permission of copied files from Ubuntu to Windows using rsync on ssh
After copying files from Ubuntu to Windows using rsync on ssh, the copied files and folder have permissions that only creator have full access and other users including SYSTEM and Administrators have ...
0
votes
1
answer
25
views
Using E2C to connect two Linux computers behind NAT
This has been asked before but I've had no success. I'm trying to connect two Linux devices via an E2C as a jump host:
[Box2 (Accessing REST API)] --> [EC2] --> [Box1 (Hosting REST API)]
What I'...
1
vote
0
answers
31
views
RPi 4 Keeps Hanging: Docker Services & SSH Fail Randomly
I have a Raspberry Pi 4 with an SSD running Raspberry OS Lite. I run Docker containers for Home Assistant, Pi-Hole, and NetDaemon. I've been experiencing random hangs where the system becomes ...
0
votes
1
answer
40
views
Is it possible to set up a remote login session where a specific user only has access to certain folders, and can only run one executable?
I have a server where I'd like to grant a user the ability to log in remotely, but restrict the session in two specific ways:
They can only access a certain set of folders on the computer, and for ...
0
votes
0
answers
19
views
curser desync when connecting to a fish shell on a raspberry pi over ssh
This is a rather specific issue, but I wouldn't be surprised if it occurs due to some more general shortcoming.
In short, the issue is that, when using the fish shell in my Raspberry Pi, over ssh, ...
0
votes
0
answers
34
views
Is there a way to reserve bandwidth for ssh on linux / debian?
I ssh into my dev machine, and then start a download, for instance "ollama pull llama3"
This uses all of the available bandwidth for the network interface, which makes ssh unresponsive until ...
0
votes
0
answers
84
views
How to use ssh x11 forwarding on Windows?
I am running XServer by VcXsrv on Windows. Here is my VcXsrv configuration, and I believe it should be listening on :0.0, which is port :6000.
<?xml version="1.0" encoding="UTF-8&...
0
votes
0
answers
27
views
Proxmox Root Passwords being changed randomly
I have a Proxmox Cluster set up with four nodes and One qDevice set up. I just got the qDevice working last night, but since this evening I'm seeing something I can't really understand. The passwords ...
0
votes
1
answer
31
views
scp not working in a custom python shell script after migration from ubuntu 20.04 to debian 12
I have this backup server where various clients upload daily archives via scp. In order to protect the machine and to manage the backups, I have written a simple python shell script that only allows ...
2
votes
1
answer
614
views
How to explain sequences of FIN,ACK instead of FIN - FIN,ACK?
Context: newly installed Debian 12, I get a bunch of strange logs related to ssh:
root@square:~# journalctl -u ssh -f
May 07 11:13:00 yop-square sshd[766]: error: kex_exchange_identification: ...
0
votes
1
answer
47
views
SSH key works for FileZilla and Windows CMD, but not PuTTY
I upgraded Raspbian on my 6 Raspberry Pi units from Bullseye to Bookworm by:
Updating /etc/apt/sources.list.
sudo apt update
sudo apt full-upgrade
I didn't change anything in the upgrade. The ...
0
votes
1
answer
45
views
How can I configure OpenSSH to forward SFTP-Requests?
I have a two-server setup in which one is only reachable via the other. The corresponding client config looks like this:
Host <actual_host>
User root
ProxyCommand /bin/bash -c "ssh ...
0
votes
1
answer
150
views
How to stop ufw-firewall preventing me to ssh into another server?
I have a weird issue on Ubuntu 22.4.4 LTS.
Using the ufw firewall, I allowed SSH/Port 22, HTTP and HTTPS. I can successfully login via SSH into my server. However, when I am logged in on the server, ...
0
votes
0
answers
35
views
Avoiding Google Authenticator Re-Authentication for Existing SSH Sessions on EC2
I've configured Google Authenticator for 2FA on my Almalinux 9 EC2 instance to secure SSH access. However, I'm prompted for the Google Authenticator code every time I open a new SSH session, even when ...
0
votes
2
answers
59
views
sshd Match on the type of pubkey being use by the authenticating user (Match PubkeyAcceptedAlgorithms)
I want to detect what type of ssh pubkey is being used by a user and do a Match Statement on it in sshd_config.
The goal is to prevent using pam if a Secure Key (https://man.openbsd.org/ssh-keygen#...
0
votes
0
answers
198
views
Ncat: Connection Refused when connecting on Linux server
I created a java application and ran it with docker inside a linux server XX.XX.XX.XX. That application should listen behind port 105 of that server. In fact, by executing the "netstat -an | grep ...
0
votes
0
answers
48
views
One liner command to ssh to server2, switch to another user in server2, ssh into server3, run commands in server3 and get output
Because I can only get to server3 from server2 (Server2 running CentOS7), I'm trying to create a "template" command or a script that I can use to :
ssh to server2
switch to another user in ...
0
votes
0
answers
90
views
no colors in vi (vim(1)) when ssh from Windows to Linux. How to fix?
Windows Terminal 1.19.10573.0
When I ssh from Windows into a linux machine, I got colored output on the shell just fine. Directories and files are colored when using ls(1). Same with grep(1); results ...
3
votes
1
answer
1k
views
How to properly secure harden SSH in 2024?
Since 1995, SSH, notably OpenSSH server [1999], is one of those essential services like DNS [1985] for admins to manage their IT landscapes.
How do I properly secure harden an OpenSSH server in 2024?
...
0
votes
0
answers
30
views
Tmux session disconnect does not preserve session content when reconnecting
I need to copy a 200gb+ file to multiple servers from one server. I have a sftp transfer running in multiple tmux sessions from the one server.
When I press ctrl+b, d to exit the tmux instance and ...
1
vote
0
answers
39
views
Why can't rsync be used in place of IMAP/POP? [closed]
Disclaimer: this relates to those who like to manage their email as files, using the likes of mutt or some other maildir reader.
Before I became familiar with the likes of rsync and scp, IMAP and POP ...
0
votes
0
answers
717
views
Vim/Nvim Remote Editing
I want to work from my local nvim client on a project on a remote machine. My job requires that I don't store any source code on my local machine and only work on remote (I think writes to /tmp are ...
0
votes
0
answers
51
views
interactive ssh connection forgetting/creating keystrokes
By and then it happens to me, that an ssh session running on WSL/windows11/ubuntu_20.04 to Centos 7.9 forgets keystrokes or other keystrokes are suddenly repeated. This is driving me crazy!
And I'm ...
0
votes
1
answer
122
views
SSH / RDP Reverse Tunnel through intermediary
The problem I am trying to solve is how to establish SSH & RDP connection to a Linux machine that is behind a firewall, with a non-static public IP, and no port forwarding capability:
Customer ...
1
vote
0
answers
29
views
How to make a script to launch different scripts in different workspaces in linux?
I have limited access to a linux machine, meaning I cannot install any external tools. I want to make a script to open terminals with ssh at different workspaces. However, I found that one way to move ...
0
votes
0
answers
18
views
How to configure ssh client for different host groups? [duplicate]
Is there a way to edit my ssh config to apply config based on groups of hosts?
Here my imaginary ~/.ssh/config
HostGroup workhosts
IdentityFile ~/.ssh/workkey
User workuser
HostGroup projectA
...
0
votes
0
answers
111
views
How to add a new SSK key to a remote server and make it works? (with Hetzner)
Problem
I've lost an ssh key and thus cannot connect anymore into my Hetzner server.
I've read a lot of answers but couldn't make it work...
I've also tried to reset my root password, but even with ...
1
vote
1
answer
248
views
Can transfer files using WinSCP but scp or rsync fail with errors like "Connection closed"
I get errors when trying to transfer files using scp or rsync, but I can transfer files using WinSCP, and it's using SCP protocol.
I'm running WinSCP on Windows 11 and scp rsync on WSL2, and when I'm ...
0
votes
0
answers
62
views
Can’t send over a SSH key to Windows 11 but process works with Windows 10. Why?
I'm running some tests with SSH with public keys. I am generating the keys with the ssh-keygen command in my Linux machine.
I'd like to use the SCP command to copy the public key to my Windows 11 ...
1
vote
0
answers
159
views
Make sftp-server return a banner/disclaimer
I am deprecating sftp access in favor of a restricted ssh based API. I need the sftp-server (OpenSSH) to return a fixed message "SFTP access will be shutdown soon", preferably on STDERR, ...
1
vote
0
answers
153
views
Copying files from Linux server to windows machine over SSH, using expect script and crontab is not reliable
We have a server that is producing reports from some elements in two formats. PDF and DOCX. I created a crontab job to automate transfer of these files from the server to one of the local Windows ...
0
votes
1
answer
131
views
Unable to submit the files by Rsync from the Windows terminal to Ubuntu VPS (code 12 error) while normal SSH authentication works fine
Although the Rsync is available for Windows, there are some problems with SSH. Here is the first one: the files are simply could not be submitted because of unclear error "error in rsync protocol ...
0
votes
1
answer
91
views
Linux/Ubuntu/Orange Pi5 retrieve open tabs on Chromium (kiosk mode) via terminal - Powershell
I have a problem as of late where I am developing some PowerShell script to manage and update some digital displays. Please see below for my work in progress (By no means done).
I am struggling to be ...
0
votes
2
answers
190
views
How can I send command line output to another computer?
This sounds kind of simple but I can't really figure it out.
I have 2 computers. One is my main computer. Another is a laptop used to run business logic. It's quite loud so I put it a few meters from ...
0
votes
0
answers
58
views
SSH forwarding audio in Debian 12 KDE
Systems:
X86_64
Debian 12 bookworm KDE
AND
Debian 11 bullseye KDE
Raspberry Pi 4B 8GB
Raspberry Pi OS (64-bit) (official port of Debian Bookworm)
PROBLEM:
I have an X86_64 receiving audio from my ...
0
votes
0
answers
13
views
Forcefully ending ssh connection deletes content of /dev/shm [duplicate]
I was just curious if the following behaviour is intentional and if somebody could explain this behaviour to me. Enlighten me on this topic.
I used /dev/shm as a place for ram transcoding until the ...
0
votes
1
answer
144
views
can anyone explain how user keys are verified (post host key/KEX, and not authorized_keys)? issue with ssh user key verify
Nutshell: Looking for a bit of an ELI5 explaining the protocol and/or implementation (openssh) of [post-KEX] user key verification (who does what) without being in code I don't understand or a too-...
7
votes
3
answers
8k
views
how to solve: ssh "Connection corrupted" error
On a Oracle/RedHat VM that I use every days (probably after the nightly upgrades) I've this authentication error:
$ ssh machine
Bad packet length NNNNNNN. ssh_dispatch_run_fatal: Connection to A.B.C.D ...
5
votes
1
answer
67
views
How to reposition window in SSH session? I am logging into a Linux machine from a Mac machine
I am using a Mac with XQuartz to display an X application running on a remote CentOS machine.
I'm trying to reposition the window from the remote machine using my keyboard, as it opens in such a way ...
0
votes
0
answers
147
views
Linux oathtool-generated TOTP 6-digit code invalid for 2FA SSH login using pam_oath.so
I'm trying to set up TOTP 2FA login into an SSH session on my Ubuntu box.
To this end I have in /etc/users.oath:
HOTP/T30/6 testuser – 8436e373cbdabce46a5d8d019c463a
(I'm generating this value over ...
1
vote
0
answers
159
views
ssh linux to windows fails, Connection reset
I have set up the sshd server in windows 11 as in the official documentation. I have transfered my public key to the windows machine to C:\ProgramData\ssh\ as administrators_authorized_keys and ...
0
votes
1
answer
730
views
How to automatically load multiple SSH keys on ZSH and PowerLevel10k
I'm trying to have my SSH keys loaded automatically when I start my computer (I'm running Archlinux). At the moment I have to use ssh-add [PATH]. I use ZSH, Oh my ZSH and PowerLevel10k.
Here is my ....
0
votes
0
answers
83
views
Debian bookworm: Long delay when starting application via ssh -X
I have a new vanilla Debian bookworm installation on a laptop. Everything works as intended but when I connect to it with ssh -X and start any application (e.g. gedit) there is a delay of ~ 25 seconds ...
0
votes
1
answer
39
views
pipefail over ssh in linux
set -o pipefail is not getting evaluated correctly on the remote host if the set command is used in ssh command.
Example
ssh hostname "set -o pipefail; false | true; echo $?" - gives 0 (Not ...
0
votes
1
answer
217
views
How to make sure a process spawned via ssh get's terminated with the connection?
Apparently people try to keep processes they started via ssh running even when the connection is gone, see https://duckduckgo.com/?q=ssh+process+still+active+after+connection+close
So I was believing ...