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
36
votes
3 answers

ssh on windows - Corrupted MAC on input

I've installed OpenSSH on Windows. I can successfully connect to my remote server via ssh with Putty from this Windows machine. But when opening a PowerShell, and trying ssh my_user@1.2.3.4 I've got the error: debug3: send packet: type 5 …
Raoul Debaze
  • 521
  • 1
  • 4
  • 6
36
votes
2 answers

Check the fingerprint for the ECDSA key sent by the remote host

I have got the well-known warning message when trying to ssh into a server: $ ssh whateverhost @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! …
Watchmaker
  • 759
  • 1
  • 7
  • 16
36
votes
5 answers

SSH remote port forwarding failed

Follow-Up: It looks like the rapid series of disconnects coinciding with a few months of running each server is probably coincidental and just served to reveal the actual problem. The reason it failed to reconnect is almost certainly due to the…
jstm88
  • 757
  • 2
  • 9
  • 21
36
votes
6 answers

pam service(sshd) ignoring max retries

I have vps that I use to run a webserver on, it currently runs ubuntu server 12.04. Since a few weeks I keep getting a lot of errors in my ssh console. 2014 Apr 11 08:41:18 vps847 PAM service(sshd) ignoring max retries; 6 > 3 2014 Apr 11 08:41:21…
Jerodev
  • 471
  • 1
  • 4
  • 8
36
votes
8 answers

Is there a command line two-factor authentication verification code generator?

I manage a server with two-factor authentication. I have to use the Google Authenticator iPhone app to get the 6-digit verification code to enter after entering the normal server password. The setup is described here:…
dan
  • 847
  • 2
  • 9
  • 11
36
votes
2 answers

How can one send commands to the "inner" ssh session?

Picture a scenario where I'm logged into a server (which we'll call "Wallace") from my local machine, and from there I ssh into another server (which we'll call "Gromit"): laptop ---ssh---> Wallace ---ssh---> Gromit Then the ssh session from…
iconoclast
  • 1,800
  • 2
  • 18
  • 30
36
votes
5 answers

In Fail2Ban, How to Change the SSH port number?

In my server, the ssh port is not the standard 22. I have set a different one. If I setup fail2ban, will it be able to detect that port? How can I tell it to check that port rather than port 22? The output of iptables -L -v -n: Chain fail2ban-ssh…
THpubs
  • 1,695
  • 7
  • 26
  • 43
35
votes
7 answers

Locked out of my own server: getting "Too many authentication failures" right away when connecting via ssh

I have an AWS EC2 Ubuntu instance for pet projects. When I tried logging in one day, this error results: ~$ ssh -i"/home/kona/.ssh/aws_kona_id" kona@server.akona.me -p22 Enter passphrase for key '/home/kona/.ssh/aws_kona_id': Received disconnect…
Arctic Kona
  • 467
  • 1
  • 4
  • 6
35
votes
8 answers

Bypass ssh key file permission check

I have an encrypted FAT volume (for compatibility) containing a private key file and other sensitive data. I want to connect to my server through SSH using my private key, but of course, as FAT doesn't support file permission, it ignores my key…
instanceof me
  • 495
  • 1
  • 5
  • 9
35
votes
5 answers

Is logging in as a shared user a bad habit?

I've worked in organizations where instead of creating a new Ubuntu user per person that wants to log into a machine, the sysadmins simply add the ssh key of each user to .ssh/authorized_keys, and everyone sshs to the machine as (e.g.) ubuntu@host…
user267001
35
votes
10 answers

Allowing SSH on a server with an active OpenVPN client

I have a VPS running CentOS 7 that I connect to with SSH. I would like to run an OpenVPN client on the VPS so that internet traffic is routed through the VPN, but still allow me to connect to the server via SSH. When I start up OpenVPN, my SSH…
odie5533
  • 475
  • 1
  • 4
  • 7
35
votes
3 answers

Why do my two ssh public keys have the same beginning?

I was updating the authorized_keys file on my server with the public key for the new laptop I got and I was surprised to discover that the two public keys began the same: # key 1 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ.... # # key 2 ssh-rsa…
Gabe Durazo
  • 485
  • 1
  • 5
  • 6
35
votes
7 answers

Can't log in via SSH to any accounts using /bin/bash shell on Synology NAS

I'm trying to install bash as the default shell on a ARM Linux running on an embedded device (Synology DS212+ NAS). But there's something really wrong, and I can't figure out what it is. Symptoms: 1) Root has /bin/bash as default shell, and can log…
Gui Ambros
  • 1,339
  • 2
  • 13
  • 17
35
votes
5 answers

Is it possible to change value of $TERM when calling ssh?

On my local terminal, I have TERM=konsole-256color, but not all remote machine I connect to have this definition. Is it possible to make ssh change the TERM on remote machine? Without changing .bash* scripts on remote machine, just by changing…
user13185
35
votes
2 answers

What options can be put into a SSH authorized_keys file?

I found this article on options that can be put before a key in the authorized_keys file. I was wondering though, are there more? Options listed in the article…
mozillalives
  • 1,003
  • 2
  • 9
  • 9