Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
1answer
7 views

SSH authentication sequence and key files : explain

As a background to troubleshooting various problems using SSH and rsync with key pairs, I wanted a straightforward overview of the sequence of events that takes place during SSH authentication, and ...
0
votes
1answer
13 views

SSH scp: cannot stat file, that seems to exist

I have file on remote machine. I can list it: ssh matous@xxx ls -la the file is in the reponse: ... -rw-r--r-- 1 matous matous 796672 Oct 11 11:12 D1.db ... Now If I try to scp it to my local ...
-1
votes
0answers
18 views

Can't connect to local MySQL server through socket error 2002 [on hold]

I get this error when I try to connect at database trough ssh. Same problem with filezilla I can't reach the server whiti this error ECONNREFUSED ERROR 2002 (HY000): Can't connect to local MySQL ...
0
votes
1answer
29 views

Why does sshpass still prompt for a password?

The context : Debian Stretch workstation trying to SSH to numerous GNU/Linux servers (mostly RH and Debian) I can not change the SSH configuration of the remote servers I know this is far from ideal, ...
0
votes
1answer
22 views

How to troubleshoot a timed out error on putty when connecting with ssh on a azure virtual machine

I just came out with a nice Debian 9 "Stretch" Virtual Machine hosted with Microsoft Azure. I've already used PuTTY, PuTTYgen and Pageant to connect with ssh to it and i've saved all this ...
1
vote
2answers
56 views

SSH from A through B to C, using private key on A

These is my scenario: Host C is not accessible from A. Host B is accessible from A. Host C is accessible from B. Both B and C have ~/.ssh/id_rsa.pub (from A) in authorized_keys B does not have the ...
0
votes
0answers
20 views

Back up using Duplicity through SCP with key-based authentication

I want to back up my system to a remote server through SCP using Duplicity. However, I use key-based authentication. How could I do this?
0
votes
1answer
24 views

ssh spammed from 127.0.0.1 (“Did not receive identification string” and “Bad protocol version identification”)

Prequel: I've seen this question, but it's not quite the same situation. I'm particularly curious about 'heroku' showing up in the logs. I just built and spun up a new Ubuntu 18.04 box that I am ...
0
votes
2answers
34 views

Bash function doesn't work for remote ssh command execution although interactive shell function fine

I define a function in .bash_aliases file and include it in my .bashrc file. My .bash_aliases file: function dmidecode() { if [[ $1 == -t && $2 == 1 ]]; then cat ~/...
0
votes
0answers
5 views

Bad owner or permissions on ~./ssh/config after upgrade to Windows 1809 [migrated]

I'm using Windows 10 OpenSSH version. After update to Windows 1809 I've got C:\Windows\System32\OpenSSH\ssh.exe myhost Bad owner or permissions on C:\\Users\\XXX/.ssh/config But execution c:\...
1
vote
2answers
46 views

How to view ECDSA host key of a server?

When getting a message like the following, how can I view the key of the server? $ ssh example.com Warning: the ECDSA host key for 'example' differs from the key for the IP address '10.0.0.2' ...
1
vote
2answers
29 views

SSH Hangs. error: openpty: No such file or directory error: session_pty_req: session 0 alloc failed

One of our Ubuntu 14.04 production servers stopped accepting SSH connections. When we try to login we get the SSH Banner text, but then it just hangs. If we login using the management console, we can ...
-2
votes
1answer
30 views

How to test ssh tunelling?

Let's say I create a reverse ssh tunnel, with the following command. ssh -R 8080:localhost:11111 user@remote I can test that the tunnel is open on the remote with nc command nc -v 127.0.0.1 8080 ...
0
votes
1answer
18 views

Security advantages: check_by_ssh versus check_nrpe

The question is which is more secure - as opposed to which is better from a configuration standpoint. I have a number of Centos and Debian systems. The NRPE daemon is installed and working on all ...
0
votes
1answer
58 views

PAM deny rule not applied on Ubuntu in Google Cloud

I added auth requisite pam_deny.so as the first line of every file in /etc/pam.d/ (including sshd), but SSH connections still succeed without a problem. This is on a default Google Cloud Ubuntu ...
1
vote
1answer
27 views

OPENLDAP 2.4 , allow anonymous access only to get User Publickey

I'm trying to do the following : I have openldap 2.4.45 server (test) which contains users, groups like this : o=Example(dc=example,dc=com) ou=users uid=alice uid=bob PublicKey="...." ...
0
votes
0answers
18 views

rsync freezes over ssh

I have been using rsync over ssh successfully in the past but for a few days now, it seems to freeze when executing the rsync command. I'm using OpenSuse Leap 15. Below is an example of the outputs I ...
0
votes
1answer
32 views

How to change the username displayed in SSH cmd line [closed]

When I login to an Ubuntu server the username is displayed as user@abc-123:~# how do I change this? eg. I want user@servername:~#.
-4
votes
3answers
46 views

I need to run SCP, SFTP and SSH in three different ports

I need to run SCP, SFTP, and SSH in the same host but via three different ports; is there a way where we can configure SSHD in that manner? Thanks in advance.
0
votes
1answer
22 views

Proxy a remote server as localhost

There is a server running in a "remotehost:some_port". I can connect to it from my linux machine like telnet remotehost remoteport. I have an application in the linux machine that is configured to ...
1
vote
1answer
59 views

remote server refuses connection

We have a dedicated remote server hosted by Hetzner. The OS is Debian 9.4 LAMP (Apache, Mysql, PHP installed by default). We use the server to analyze big data using python (a little), R (R-studio ...
0
votes
0answers
8 views

Not able to login after migrating libvert on-prem boot disk to Google cloud platform using cloud endure migration service [duplicate]

I migrated the vm from libvirt to Google Cloud Platform using Cloudendure. The initial sync is complete and is in Data Replication stage from over a week. Once the VM is launched using test mode and ...
0
votes
0answers
31 views

SSH proxy jump interactive

I have a system wherein I am using SSH proxy jump as a way to connect from machine A to machine X through some number of intermediary steps. The advantage to this is that I can have an SSHkey on ...
0
votes
1answer
31 views

ec2 ssh Permission denied (publickey)

Two days ago, I tried to connect to the server with ssh as usual. But I got a connection refused error. I've tried a lot of solutions. As in this youtube video (https://www.youtube.com/watch?v=...
0
votes
1answer
52 views

How to execute 2 scripts on a server via ssh by chaining them and within only a single connection? [closed]

I have these 2 commands that I send to my server: - cat ./script1.sh var1 var2 | ssh my_user@my_server.com - cat ./script2.sh var3 var4 | ssh my_user@my_server.com This is a part of Gitlab CI, but ...
0
votes
1answer
63 views

Cannot ssh to ubuntu gcp instance

I migrated the vm from libvirt to Google Cloud Platform using Cloudendure. The initial sync is complete and is in Data Replication stage from over a week. Once the VM is launched using test mode and ...
0
votes
1answer
66 views

Forwarded connection refused by server: Administratively prohibited. Using both @IP and PermitOpen

[This Machine is 192.168.80.125] Normal SSH Rules to allow all basic access: AllowUsers user1 PubkeyAuthentication yes PasswordAuthentication no AllowTcpForwarding ...
0
votes
2answers
34 views

SSH Show motd without re-connect

As the title say I'm setting up the motd scripts for my server, in the directory: /etc/update-motd.d/ I want to see them without re-connect to ssh, there is a command to display the ssh motd?
0
votes
1answer
25 views

SSH keys for utility services on remote production server

For convienience I'd like to have a private SSH key on my remote server. But doing that creates a vulnerability if the server were hacked. Same as if I'd hard coded a password, anyone who broke in ...
0
votes
2answers
73 views

Permission denied (publickey) when cloning git repo, but SSH works fine

I'm attempting to clone a git repo using SSH protocol like so: sudo git clone ryan@example.com:/var/www/repo But I'm getting the "Permission denied (publickey)" error. However, I already placed my ...
0
votes
1answer
42 views

autossh options to open a port through a jumpbox

I'm connecting to a DB in a private subnet through a bastion host: ssh -N -M -i ${PEM_FILE} -L 3306:${DB_HOST}:3306 ec2-user@${BASTION_PUBLIC_IP} But the connection drops very quickly. Is there a ...
-1
votes
0answers
24 views

How do I route all requests from one linux server to another?

I want to route all requests from server A to server B (like a proxy) (i want to hide the ip from server B because Server A have a good ddos protection and server B not) I tryed this but this ...
-2
votes
3answers
53 views

SSH to server as one user, switch to root and create mysql dump - how to script this

I want to be able to copy a mysqdump from a remote server to my local machine. I had a script to do this, but our operations guys have now changed the server permissions and it doesn't work. So ...
0
votes
2answers
51 views

Ansible - wrong passphrase - even if it has to be correct

i am running ansible modules/playbooks (for example ping) with this command by user, who have sudo rights: sudo ansible -m ping hosts "hosts" is group of 2 hosts. When i run this, i'm asked for ...
0
votes
0answers
22 views

“bash: cannot set terminal process group : Inappropriate ioctl for device” when opening an ssh session

Server is running Raspbian stretch, I am conncting from a Windows station. When I try to start a bash shell: C:>ssh myuserid@192.168.1.11 sudo /bin/bash -i I get: myuserid@192.168.1.11's password: ...
7
votes
1answer
660 views

SCP with password authentication only doesn't ask me for password

I'm trying to copy files from one server to another with scp. On both servers, I configured ssh port to 222. sshd_config for both servers is exactly the same (no RootLogin, PasswordAuthentication ...
0
votes
1answer
39 views

SSH into Xen Virtual Machine connection refused

While practicing for SysAdmin certification, I spun up a virtual machine. I could not SSH into it from my laptop on my LAN. I could SSH into the VM from within the host OS. After some reading and ...
-2
votes
2answers
47 views

SSH connection permission denied

I am trying to login into remote server without password using ssh but I am get the error: Permission denied (public key) To copy .pub key to the server, I had: PasswordAuthentication = yes (in the ...
0
votes
1answer
20 views

Working around firewall to install packages

Hi I've been using linux for couple years now but never really sent much time on sysadmin stuff so I sort of know pieces of the answer but I need someone help me fill in the gaps. I have an EC2 ...
-2
votes
0answers
25 views

Sharing local 4g USB modem internet connection through public/remote servers IP to be used as a Proxy

After 30+ hours of research and trying different solutions I have found many solutions to each piece of this puzzle but can't quite get them to work together or figure out the best approach so I'm ...
0
votes
1answer
53 views

selinux in a chroot environment

I need to change selinux policy for /etc/ssh/sshd_config in a chroot environment designed to rescue my system (on a dedibox) : it actually does not have any selinux context defined and then sshd won't ...
-2
votes
2answers
74 views

How to completely block ssh using firewalld

I have private network set up on a static ip, and I have configured my router at 192.168.1.1 to forward port XX to port 22 on my local server in order to allow ssh access. I am able to ssh in just ...
-1
votes
0answers
24 views

Can no longer login to CoreOS amazon instance. Prompting for password

I have two Coreos Container Linux server instances running on Amazon providing front end services to a cluster of machines. Today, both machines became unreachable and had to be stopped and restarted....
0
votes
0answers
28 views

X11 Forwarding Fails Without Specific Error

I use ssh -Y host -vv -M and get: ... debug2: x11_get_proto: /opt/X11/bin/xauth list /private/tmp/com.apple.launchd.iRkMUbydAz/org.macosforge.xquartz:0 2>/dev/null debug1: Requesting X11 ...
0
votes
1answer
40 views

how do you reach a secure shell server connected to a virtual private network?

Simply put : Laptop running ssh and connected to a vpn. How do I ssh to it ? I get the external ip with a google search, my router forwards port 22 on the laptop and I can connect with success when ...
0
votes
1answer
64 views

SSH to different devices behind router using domain names without Nginx/Reverse Proxy? [duplicate]

I'd like to access multiple different devices residing on my home network, from anywhere else in the world, using custom domain names. I'm running a standard (commercial) router provided by my ISP, ...
4
votes
0answers
129 views

Change default certificate signing algorithm in ssh-keygen

Presently, OpenSSH 7.8 (Fedora 28/Arch) is unable to negotiate with a OpenSSH 7.4 (CentOS 7) server utilizing a certificate signed key, as described in a bug filed on redhat's bugzilla. OpenSSH ...
0
votes
0answers
21 views

Why does an ssh connection work on one Amazon AMI but not another

I'm booting two separate Amazon AMIs but having different ssh connection results with each. i.e. AWS Amazon Linux 2: ami-0bdb1d6c15a40392c - can't connect with ssh and AWS Amazon Linux 1: ami-...
-2
votes
1answer
82 views

VPN connection for SSH access to a single publicly available

My goal is to have a VPN tunnel on a single port on a server's public IP and be able to SSH into the server with an additional VPN layer of encryption. DETAILS OF THE SERVER CONFIGURATION: I am ...
0
votes
0answers
40 views

How to use different php version on ubuntu

I have a main webpage that uses php v5.6, now we're integrating a project into a subdomain that need php v7.1 /var/www/html/mainpage.com /var/www/html/subdomain.mainpage.com The server is a vps ...