Questions tagged [openssh]

Questions about the OpenSSH implementation of the ssh protocol.

OpenSSH is a free version of the SSH connectivity tools. It is developed by the OpenBSD Project and in countries that permit cryptography export. It is freely useable and re-useable by everyone under a BSD license.

OpenSSH is developed by two teams. One team does strictly OpenBSD-based development, aiming to produce code that is as clean, simple, and secure as possible. The other team then takes the clean version and makes it portable (being then "less clean") to make it run on many operating systems -- the so-called -p releases (ie "OpenSSH 4.0p1").

Further reading

764 questions
257
votes
4 answers

How to enable diffie-hellman-group1-sha1 key exchange on Debian 8.0?

I am unable to ssh to a server that asks for a diffie-hellman-group1-sha1 key exchange method: ssh 123.123.123.123 Unable to negotiate with 123.123.123.123 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 How…
j1088099.mvrht.com.
  • 2,903
  • 3
  • 13
  • 20
130
votes
5 answers

How to ssh to remote server using a private key?

I have two servers. Both servers are in CentOS 5.6. I want to SSH from Server 1 to Server 2 using a private key I have (OpenSSH SSH-2 Private Key). I don't know how to do it over unix. But what I did on windows using Putty was to feed my OpenSSH…
Aivan Monceller
  • 1,563
  • 2
  • 11
  • 10
120
votes
5 answers

what's the purpose of ssh-agent?

I've read the official definition: ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA, ECDSA). The idea is that ssh-agent is started in the beginning of an X-session or a login session, and all other windows…
agent_smith
  • 1,495
  • 3
  • 11
  • 8
105
votes
3 answers

What's the purpose of the randomart image for user (not host) SSH keys?

The ssh-keygen generates the following output: The key fingerprint is: dd:e7:25:b3:e2:5b:d9:f0:25:28:9d:50:a2:c9:44:97 user@machine The key's randomart image is: +--[ RSA 2048]----+ | .o o.. | | o +Eo | | + . | | …
syntagma
  • 12,091
  • 21
  • 57
  • 74
101
votes
5 answers

What is the point of sshd “UseDNS” option?

I know what it does, but I don't know why. What attack(s) does it prevent? Is it relevant for all kind of authentication methods? (hostbased, password, publickey, keyboard-interactive ...)
user368507
  • 2,143
  • 4
  • 19
  • 17
89
votes
5 answers

Where are my sshd logs?

I can't find my sshd logs in the standard places. What I've tried: Not in /var/log/auth.log Not in /var/log/secure Did a system search for 'auth.log' and found nothing I've set /etc/ssh/sshd_config to explicitly use SyslogFacility AUTH and LogLevel…
HXCaine
  • 1,119
  • 1
  • 8
  • 9
84
votes
5 answers

How do I convert a ssh-keygen public key into a format that openssl PEM_read_bio_RSA_PUBKEY() function will consume?

I'm having an issue generating a public key that the openssl PEM_read_bio_RSA_PUBKEY() function can consume. I keep getting errors. Obviously I cannot simply use the ASCII string in the ssh-keygen <>.pub key file as it is in SSH file format or I…
PeteP
  • 841
  • 1
  • 7
  • 3
79
votes
1 answer

Single command to login to SSH and run program?

Is there a way to structure a single command to login via SSH to a remote server and run a program on the remote login shell? In the OpenSSH manual, it reads "If command is specified, it is executed on the remote host instead of a login shell." So,…
user981178
  • 1,017
  • 1
  • 7
  • 10
77
votes
3 answers

OpenSSH: How to end a match block

I'm using a Match block in OpenSSH's /etc/ssh/sshd_config (on debian) to restrict some users to SFTP: # my stuff Match group sftponly X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp -u 0002 ChrootDirectory %h As…
mreithub
  • 3,543
  • 2
  • 18
  • 17
68
votes
4 answers

How to connect ssh from a specified port?

I know how to connect 'to' a certain port using ssh. ssh user@remotehostip -p XXX Is there a way to establish ssh from the port which my local computer will be using?
kwagjj
  • 2,309
  • 6
  • 22
  • 29
64
votes
3 answers

What is the difference between an OpenSSH key and PuTTY key?

I've found that ssh-keygen ("ssh" package) produces different keys from puttygen ("putty" package). If I create public and private keys with ssh-keygen some SSH servers will not accept my keys. If I create keys with puttygen only one server does…
YarLinux
  • 1,143
  • 1
  • 9
  • 13
61
votes
4 answers

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

I am trying to ssh to remote machine, the attempt fails: $ ssh -vvv [email protected] OpenSSH_7.7p1, OpenSSL 1.0.2o 27 Mar 2018 ..... debug2: ciphers ctos: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc debug2: ciphers stoc:…
lesnik
  • 1,341
  • 2
  • 13
  • 20
49
votes
1 answer

Display full settings of sshd

The OpenSSH daemon has many "default" values for its settings. So looking at the sshd_config might not give someone the complete set of active settings. How to display the full sshd configuration (for OpenSSH)?
Huygens
  • 8,985
  • 3
  • 31
  • 36
45
votes
7 answers

What is the default idle timeout for OpenSSH?

I can't seem to find an answer to this simple question, which I need for some compliance documentation. On a default install of CentOS 6.5 (OpenSSH 5.3p1-94.el6), after how long of being idle will a user's SSH session be terminated? I believe the…
Banjer
  • 2,870
  • 6
  • 27
  • 35
42
votes
2 answers

Multiple 'Host *' in ssh_config?

My understanding of the way ~/.ssh/config works is that each 'Host ' line takes effect for any host matching after that point in the config file. I have a number of personal servers and work servers that I need to connect to. I'm trying to do…
harleypig
  • 523
  • 1
  • 4
  • 5
1
2 3
50 51