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.

Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send information, notably passwords, in plaintext, rendering them susceptible to packet analysis.

It's important to note that there are two versions of SSH (1 and 2), and that version 1 is no longer considered secure, and should be replaced by version 2 where ever possible.

More information, including the more notable SSH-1 vulnerabilities, can be found at the Wikipedia page for SSH.

8868 questions
4
votes
1 answer

Why do I have two known_hosts entries for github?

If I run git clone git@github.com:some-org/some-repo.git, I'm prompted with the following: The authenticity of host 'github.com (192.30.253.113)' can't be established. RSA key fingerprint is…
Roger Lipscombe
  • 2,177
  • 6
  • 24
  • 37
4
votes
2 answers

SSH key authentication at server side

I usually do ssh key authentication as follows: generate key on client pc (# ssh-keygen -t rsa) copy the key to server (using ssh-copy-id or by other means) access server from client PC. I have seen AWS servers (Amazon web servers) provide a key…
4
votes
1 answer

HostKeyAlgorithms in sshd config on debian - daemon reload fail

I have a Debian Jessie Server and I would like to verify the fingerprint of the ssh keys on the server about a DNS SSHFP record. This works fine, but if a client connect over ssh to the server, the server provide the ssh-ecdsa algorithm. I'd like to…
Volker Raschek
  • 347
  • 1
  • 5
  • 17
4
votes
1 answer

Different ssh authentication policies for different accounts

I know that I can disable SSH authentication with clear text password for root user (using PermitRootLogin) and enable it for all other users. But I need to disable text passwords for some list of users (and keep only public keys authentication for…
VeLKerr
  • 145
  • 6
4
votes
1 answer

How to properly setup X forwarding on (Ubuntu) linux?

From my desktop, I can get to my wife's machine on the lan using: ssh -X user@1.2.3.4. Both systems are running the desktop flavour of Ubuntu 9.10-64bit. But here is the problem: When I try to run X apps like gedit, it fails with the following…
Stéphane
  • 456
  • 1
  • 7
  • 16
4
votes
1 answer

SSH to Remote host via another host

I am trying to ssh to remote Host B, but network access control governs I am only able to do this via Host A. How would I go about doing that? Have tried creating a tunnel to Host A ssh -f -N -D 2222 user@hostA Then when creating new ssh connections…
0rangutang
  • 43
  • 1
  • 3
4
votes
2 answers

Port 22 blocked on AWS instance, can't SSH

I enabled UFW on my ec2 instance and followed the following steps: abhi@my-ip-address:~$ sudo ufw default deny incoming abhi@my-ip-address:~$ sudo ufw allow 2200/tcp abhi@my-ip-address:~$ sudo ufw allow 80/tcp abhi@my-ip-address:~$ sudo ufw allow…
Abhishek Ghosh
  • 143
  • 1
  • 5
4
votes
2 answers

Replace scp with sftp

We have a few synchronization scripts for a client sending files, using scp, to a remote server administered by one of their providers. Recently they closed it, and the new one they provided doesn't permit scp, only sftp (there is no way to get a…
Ulrar
  • 387
  • 6
  • 23
4
votes
1 answer

Directadmin: Existing user with enabled SSH access can't login

I've been using directadmin for a while now. But I can't figure this one out. Today a customer wanted to have SSH access so I enabled SSH access on the user he uses to login to his FTP. I tried logging into the user with SSH and it did not…
Efekan
  • 171
  • 7
4
votes
1 answer

Provide sudo password over ssh while using Bash process substitution?

My question can be seen as an extension of How do diff over ssh? with a little twist. Environment macOS Sierra (10.12.3) OpenSSH 7.3 Example situation I am trying to print a diff between two files, one of them is located on a remote host and…
4
votes
1 answer

SSH fails after Port change on CentOS 7

After changing the port. And restarting the SSH service, it failed on me. I got the following info when I ran systemctl status sshd.service: sshd.service: main process exited, code=exited, status=255/n/a Unit sshd.service entered failed…
Nikk
  • 239
  • 1
  • 4
  • 10
4
votes
1 answer

how ssh-agent process is increasing on every login

i have added the following line in my .bashrc file to start ssh-agent if it is not running. if [ -z "$SSH_AUTH_SOCK" ];then eval `ssh-agent -s`;ssh-add ~/.ssh/my_private_key;fi But every time when i login again the number of ssh-agent process is…
Pawan
  • 41
  • 1
  • 2
4
votes
2 answers

Remote SSH command hangs, but only when executed through Jenkins

Disclaimer: I'm a bit new to the community, please be gentle :) I'm having an SSH issue that I just can't seem to explain. As a bit of background, here's the problem that I'm solving: There are several disparate Java services that existing within…
cerberus
  • 322
  • 3
  • 8
4
votes
7 answers

How to exit a SSH connection in a bash script

I've read several posts on here about this topic but every solution I find seems to be a one liner where you run one command. I'm creating a script where I ssh to several different hosts one after a time. The goal is to ssh to a machine, do some…
Joshua
  • 179
  • 1
  • 3
  • 12
4
votes
2 answers

SSH Jump Host WITHOUT Agent Forwarding

Although a simple question, I have searched for days without success. M = My machine J = Jump Host S = Server Jump Host has my public key on authorized_keys. Server has J's public key on authorized_keys. Allowed connections (due to key…
cmf
  • 143
  • 1
  • 5