Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [ssh]

SSH (Secure SHell) is a protocol for securely running commands on a remote computer. Use this tag for questions about configuring, using and trouble-shooting SSH client and server software.

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

sftp login failure due to O_NONBLOCK error

I am trying to login via sftp in an ftp server I set up on Debian 9 using OpenSSH. The user I am trying to login with has /sbin/nologin as login shell. (but I do not think this has to do). When ...
0
votes
1answer
16 views

chain a series of SSH logins and process killing

I need to log onto 100 pc's and stop the processes ran by a certain user on them. Manually I would say ssh comp01 killall -u user Which also logs me out of the computer, so then I can run. ssh ...
9
votes
5answers
15k views

.ssh/config to start remote session in zsh

I would like to start a remote session without typing the following command ssh user@remoteserverip -t zsh I know that I can change the host names in the ~/.ssh/config to simply use something like ...
0
votes
2answers
31 views

IPTables ssh port redirect

I have quite some VPS running Ubuntu LTS 18 with iptables as firewall. At the moment I am running SSH on port 22, on which there are many, many login attempts from foreign IP addresses. I want to ...
1
vote
2answers
96 views

ssh & sftp work with netns, but sshfs doesn’t

Here, I use netns to use a VPN, but sshfs doesn’t work properly. Here's what I tried: root@ubuntu:/mnt# ip netns exec secured sshfs -d -o sshfs_debug -p PORT USER@HOST: MOUNTPOINT SSHFS version 2.8 ...
1
vote
1answer
121 views

SSH Error on AWS EC2

After connecting succesfully to AWS on the latest iMac through Bash Script 1: chmod 400 ~/PEM.pem ssh -i "~/PEM.pem" ec2-user@address.com jupyter notebook --no-browser --port=8888 Then opening a ...
4
votes
1answer
5k views

.Xauthority file is empty

I have been trying to ssh -X to my cluster running OpenSUSE 11.2. It used to work well for me. But now I get this message: X11 connection rejected because of wrong authentication. Failed to open the ...
0
votes
1answer
1k views

ssh publickey anthentication failed

I have set up SSH connect between two AIX servers. But It failed when I try to ssh to the server side, sending publickey packet and no reply return. Both client and server users are passwordless, ...
1
vote
1answer
1k views

not able to ping through ssh tunnel device

I am trying to create an ssh VPN (through port 443) to bypass NAT and filtering. I am using this tutorial. The OS is Debian testing on both sides. The tunnel devices are created on both sides, and ...
12
votes
8answers
24k views

rsync keeps disconnecting: broken pipe

I'm using rsync to backup my home directory. This has been working fine for a long time now. Here's the command I'm using: rsync \ -pavz \ --delete \ --exclude 'mnt/' \ --exclude '....
2
votes
5answers
587 views

Is it more convenient to login to SSH using a password because SSH Keys need to be stored on each computer [closed]

It seems like using a username and password for SSH would be more convenient because it can be typed whereas a private key needs to be stored on every computer you use for SSH. Therefore if you want ...
0
votes
2answers
999 views

Terminal to manage cluster, where the nodes are accessible from a remote PC?

I need to manage multiple cluster nodes from my PC. The catch is that the cluster nodes are accessible only from a remote PC. So first I have to ssh to the remote PC, and then ssh to a cluster node ...
3
votes
2answers
2k views

Difficult authorized_keys login problem only for root on Solaris 11

Here's a difficult ssh problem I can't figure out on Solaris 11, although I think I'm an experienced UNIX/Linux sysadmin. :) I've copied the root@server1:/root/.ssh/id_rsa.pub file to: root@server2:/...
3
votes
1answer
1k views

Making ChrootDirectory directory writable by SFTP user

If a user logs into a machine via SFTP, one can make use of ChrootDirectory keyword to give an illusion that user is in a root directory. But that directory is only writable by root user. I would love ...
0
votes
1answer
35 views

“ssh user@host echo $PATH” gives me local path not remote path

why the command ssh user@host echo $PATH or ssh user@host -t echo $PATH return me the path on the local machine and not the path on the remote one? This means that executing a remote command ...
2
votes
1answer
32 views

Why is my username/hostname in the SSH public key?

When generating a SSH key i used the cat command on the file id_rsa.pub and noticed the hostname/username of my account was within the file. Why is this there? If I was copying this onto a server ...
1
vote
1answer
30 views

Sending jq with argjson via ssh

I'm trying to run jq command via ssh for this JSON: { "nodes": { "app": { "nodes": 1, "is_manager": true, "ip": [ "0.0.0.0" ], "cpus": 16, "memory": ...
4
votes
2answers
219 views

browsing localhost via ssh socks tunnel not working

I used to have a successful configuration in my local computer to access a remote host's web server via SSH SOCKS proxy, by typing in Firefox localhost:5000 for example. I created a rule in the server'...
86
votes
6answers
107k views

Automated ssh-keygen without passphrase, how?

I would like to make an automated script that calls ssh-keygen and creates some pub/private keypairs that I will use later on. In principle everything works fine with.... ssh-keygen -b 2048 -t rsa -f /...
2
votes
2answers
2k views

How to display commands executed via ssh and their user's IP?

I asked a question before, but I didn't get a satisfying answer in : How can I display ssh commands executed from another machine? so I'll ask this time precisely. How to display commands and their ...
1
vote
1answer
1k views

Linux LiveCD Server with FTP & SSH Services

Could anyone please suggest me a LiveCD (Linux Based) with SSH & FTP Services. Basically I don't want to install anything on my laptop so I just want to boot LiveCD with FTP/SSH services so I can ...
5
votes
4answers
8k views

What it the min/max port range for SSH?

I want to change my ssh port from 22 to something else. What is the port range I can change it to? Also, I don't want it to conflict with other apps that use common ports. What ports should I avoid?
2
votes
0answers
45 views

Can't SSH as root user, can ssh as regular user?

I have a system with Ubuntu Server 18.04.3 (machine1) connecting to a raspberry pi 3B+ running raspbian buster (machine2). I am setting up something with sshfs. I am validating the configuration ...
2
votes
2answers
2k views

X11 forwarding to Mac does not work

I'm running a Ubuntu server in VMWare. And I would like to forward the X11 from the Ubuntu guest to the Mac host. I've installed XQuartz 2.7.9 (xorg-server 1.17.4) on the Mac host. And SSH ...
0
votes
1answer
21 views

How to unbottleneck cpu-bound OpenSSH?

sneak@nostromo-2:~$ for i in 3des-cbc aes128-cbc aes128-ctr aes128-gcm@openssh.com aes192-cbc aes192-ctr aes256-cbc aes256-ctr aes256-gcm@openssh.com chacha20-poly1305@openssh.com; do openssl rand ...
1
vote
1answer
2k views

How to generate a .pem file for ssh?

I've added my ~/.ssh/id_rsa.pub to my server's 'authorized_keys' file so I can do ssh user@myserver -p port and login to the server successfully. Yet when I do ssh-keygen -f id_rsa.pub -m 'PEM' -e &...
3
votes
0answers
33 views

Processes started through SSH add up to limit of SSH Daemon (systemd)

on a productive server there are (background) processes started by users which connect through SSH and run some scripts. These processes are daemons and keep on running. Each started process is found ...
6
votes
2answers
80 views

SSHFS/SFTP : Vim hangs when trying to edit file over sshfs and can't upload file over MTU size over sftp

My university provides an ssh access to the students university accounts, and I just set up an sshfs to access some folders on my remote account. I am running pop_os on my local machine and using ...
1
vote
1answer
2k views

Cannot use root ssh despite option “PermitRootLogin yes” in sshd_config

I am unable to connect to ssh despite the fact that PermitRootLogin option is set to "yes" in my sshd_config. ssh localhost root@localhost's password: Permission denied, please try again. Here is ...
1
vote
0answers
30 views

I can not use ssh to connect to the debian sshd

I have a debian server, in my mac I use filezilla to ssh connect to it, but get the below error: Error: Disconnected: No supported authentication methods available (server sent: publickey) Error: ...
18
votes
3answers
42k views

ssh Unable to negotiate: “no matching cipher found”, is rejecting cbc

I am trying to ssh to remote machine, the attempt fails: $ ssh -vvv admin@192.168.100.14 OpenSSH_7.7p1, OpenSSL 1.0.2o 27 Mar 2018 ..... debug2: ciphers ctos: aes128-cbc,3des-cbc,aes192-cbc,aes256-...
0
votes
3answers
234 views

Command '' not found + virtualenvwrapper error on ssh login (Ubuntu 18.04 x64)

when logging into my VPS with ssh keys, I get this: Command '' not found, but can be installed with: sudo apt install libpam-mount ... sudo apt install nmh ...
0
votes
0answers
29 views

Saved file changes in editor lost when disconnected using X forwarding over SSH

I have a very strange problem on a debian stable server: There is a file opened in a text editor on the remote machine using X11 forwarding over SSH. The file changes were supposedly saved to disk ...
3
votes
2answers
5k views

How to mount automatically sshfs when RSA authentication is not an option?

I would like to mount a file system on a remote machine automatically at each Linux startup. However I always need to use password authentication because I cannot use ssh-copy-id. How do I make this ...
0
votes
0answers
21 views

How to allow SSH availability checks but restrict login from specific IP? [duplicate]

I need the possibility of monitoring host to check availability of monitored host's SSH port availability via telnet, but at the same time I want to prevent SSH logins from monitoring host. Is there ...
-1
votes
1answer
26 views

Permission denied (publickey,gssapi-keyex,gssapi-with-mic) Amazon Linux

I've looked at the other questions on this and none have worked for me. I did the following to add a new user on an EC2 instance running Amazon Linux: sudo usermod -G git_group rich sudo mkdir -p /...
1
vote
3answers
20 views

Detach from tmux session and close ssh session with 1 command

Frequently I want to exit my ssh session without also killing the tmux session I am using. To do this I have to run the following commands: tmux detach exit or alternatively use the shortcut Ctrl+B ...
10
votes
5answers
46k views

Can't ssh, connection terminates immediately with exit status 254

The most recent thing I remember is changing the soft and hard memlock ulimit to unlimited. Now I can't ssh into the machine. This is the ssh log. Authenticated to IP ([IP]:22). debug1: channel 0: ...
37
votes
4answers
70k views

Use ssh with a specific network interface

I'm using openconnect to connect to vpn. After entering my credentials, I get this: POST https://domain.name/... Got CONNECT response: HTTP/1.1 200 OK CSTP connected. DPD 30, Keepalive 30 Connected ...
2
votes
1answer
49 views

Error While Binding Sshd to Port 2222 During Update on Debian 10 “Buster”

Got here following error output while updating: Errors were encountered while processing: openssh-server ssh E: Sub-process /usr/bin/dpkg returned an error code (1) Setting up openssh-server (1:7....
0
votes
1answer
18 views

Port forwarding with iptables not working anymore

I installed SSH honeypot cowrie and configured real ssh to use a different port. The honeypot is supposed to use a port n. Iptables is configured to route traffic from port 22 to port %PORT: ...
0
votes
1answer
517 views

Gnu parallel rsync hanging indefinitely

To be clear, I am running this exact command(variables changed) in a gnu parallel setting: /usr/bin/parallel -q -j20 rsync --recursive -av -e ssh -oCompression=no -x -T -oUserKnownHostsFile=...
5
votes
1answer
2k views

How to pass private ssh key via string, not a file?

I have a text of a private key file. I want to connect via ssh to other node, yet the gateway I am in does not provide me with file system access. How to pass a text representation of key and not a ...
208
votes
9answers
161k views

Keep SSH Sessions running after disconnection

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and ...
0
votes
1answer
1k views

SSH connection refused. Error 61

So, I set up another FreeBSD server. Everything was ok until I tried to connect to it via my old FreeBSD. On connection it echoes: Unable to connect to relay host, errno=61 ...
0
votes
0answers
23 views

How to open SSH port 22 to connect medusa to my router ip

I've been learning how to brute force my own router password through medusa and I've encountered the following error: NOTICE: ssh.mod: failed to connect, port 22 was not open on 192.168.0.1 note ...
49
votes
6answers
61k views

How to kill SSH session that was started with the -f option (run in background)

I'm pretty lost on this. From the man page: -f Requests ssh to go to background just before command execution. After starting SSH with the -f option, I have a working tunnel. But after I ...
0
votes
0answers
29 views

Can't use remote server because too many open files in system

I'm running some python programs in the background of a remote Ubuntu machine. The program opens too many files that exceed the system limit. I want to ssh to the remote server now, but I can't ...
3
votes
1answer
34 views

Sftp Connection Via Gigolo on Debian 10 “Buster”

Trying here to establish sftp connection via Gigolo on Debian 10 "Buster" with Gigolo application, but when connecting at sftp://user@192.168.41.72, for example, receives here Location is not ...
1
vote
0answers
39 views

SSH Fails at “kex_exchange_identification”

I'm trying to connect over ssh to an Ubuntu 18.04 VM running in VMWare on my local machine. Local machine has openssh server up and running. Apple's default ssh binary fails connecting to VMs in ...