OpenSSH is one of the most popular implementations of SSH used today and available by default in many Linux and Unix-like operating systems.

learn more… | top users | synonyms

45
votes
8answers
87k views

Remove key from known_hosts

I built several virtual machines during the last few weeks. The problem is, the .ssh/known_hosts gives me the Man in the middle warning. This happens because another fingerprint is associated with the ...
28
votes
6answers
9k views

Is there a way for one SSH config file to include another one?

In case it matters: OS: Ubuntu 10.04 SSH: OpenSSH_5.3p1 Debian-3ubuntu5 I'd like one SSH config file to include another one. The use case would be to define whatever I want in my default ...
17
votes
10answers
27k views

Why does the “password” prompt take forever when I SSH into my Ubuntu 9.05 server?

Answer: It was, in fact, performing reverse DNS resolution. Based on the suggestions below and this article, I added "UseDNS no" to my sshd_config, rebooted ssh, and now the password prompt displays ...
12
votes
7answers
31k views

OpenSSH server refuses to accept key authentication

I tried to use public key authentication on my new server, and I came across this problem. $ ssh -v -i .ssh/server 192.168.1.100 OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011 debug1: Reading configuration ...
11
votes
1answer
2k views

how to disable SendEnv variables set in ssh_config from ~/.ssh/config

I couldn't find that anywhere so I'm wondering am I the only one hitting such issue. By default ssh on Red Hat and Debian at least has a ssh_config with SendEnv option passing LC* and LANG variables ...
10
votes
3answers
5k views

SSH: completly disabling password authentication

is there a way to disable password authentication completely? The command line is the following: ssh -o KbdInteractiveAuthentication=no -o PasswordAuthentication=no machine" it STILL asks for a ...
10
votes
5answers
29k views

How to SSH to localhost without password?

EDIT: Putting exactly what was done. I need to SSH to localhost without a password, the usual way of doing it (with public keys) do not work. user@PC:~$ rm -rf .ssh/* user@PC:~$ ssh-keygen -t rsa ...
10
votes
2answers
1k views

How to determine the port allocated on the server for a dynamically bound openssh reverse tunnel?

When creating reverse tunnels on recent versions of OpenSSH a remote port of 0 can be given to bind any available port: -R [bind_address:]port:host:hostport ... If the port argument is ...
9
votes
9answers
19k views

How do I skip the “known_host” question the first time I connect to a machine via SSH with public/private keys? [duplicate]

How do I skip the "known_host" question the first time I connect to a machine via SSH with public/private keys?
8
votes
2answers
20k views

How to uninstall/reinstall cygwin to use the sshd?

I installed cygwin/sshd without good results. I removed the c:\cygwin directory to reinstall. I removed the sshd Administrator user by hand. I reinstalled the cygwin again, then run the ...
8
votes
1answer
6k views

Denyhosts keeps adding my IP address to hosts.deny

I have setup Denyhosts to run on my server, and have been using it succesfully for the last few weeks, to allow me to ssh into my server from my home dev machine. This morning, I accidentally typed ...
8
votes
1answer
22k views

How can I setup the openSSH SFTP server on Linux?

I want to configure sftp-server to share a directory but I don't know how to modify /etc/ssh/sshd_config. My requirements are: 1) Login shall not use certificates, only password (i.e. authorization ...
8
votes
1answer
3k views

How to add pointers to filesystems outside the chrooted environment - using chrooted SFTP via OpenSSH

So, I'm pretty sure this is true, but I haven't found a specifically detailed independent reference that directly answers my question. Question being: How can I add access to a resource that is ...
7
votes
2answers
3k views

How to make ssh log in as the right user?

I use ssh on a variety of machines, mainly linux. Accounts on these machines vary in naming scheme: if my name is First Last, then I have accounts: first, flast, last_f, lastf, and sometimes I need to ...
7
votes
1answer
4k views

Checking ssh keys have passphrases

I have a bunch of users, who with SSH keys have access to accounts on other servers. Currently I have a script which collects up the ssh public keys and distributes them to the correct account on the ...
6
votes
2answers
10k views

change default username when ssh to another pc [duplicate]

When I ssh between different pcs I can omit my username (tom) and just type ssh pc_name instead of ssh tom@pc_name I like this feature, and have got into the habit of using it. Unfortunately, ...
6
votes
2answers
54k views

SSH Permission denied on Correct Password Authentication

I could successfully SSH into my machine yesterday with the exact same credentials I am using today. The machine is running Centos 6.3. But now for some reason it is giving me permission denied. Here ...
6
votes
4answers
3k views

Secure remote editing of root-accessible files over SSH

As per security best practices one should not allow root login over SSH with password or keys. Instead, sudo should be used. However, if one wants to use SSH (SFTP) for remote editing of server ...
5
votes
4answers
21k views

Can someone explain the 'PasswordAuthentication' in the /etc/ssh/sshd_config file?

On this page, the explanation given is: The option PasswordAuthentication specifies whether we should use password-based authentication. For strong security, this option must always be set ...
5
votes
5answers
7k views

How to edit known_hosts when several hosts share the same IP and DNS name?

I regularly ssh into a computer which is a dual-boot OS X / Linux computer. The two OS instance do not share the same host key, so they can be seen as two host sharing the same IP and DNS. Let's say ...
5
votes
6answers
8k views

How to tunnel port 25565 through SSH?

I want to play a game which is hosted on port 25565 (minecraft!), but my university firewall does not allow this port. I have a dedicated server running linux not too far from uni, so I think there's ...
5
votes
1answer
4k views

ssh config under cygwin

I have Cygwin installed on Windows 7. I made default install. I would like to use ssh config file (~/.ssh/config) to set host and options for connecting. Normal ssh command is not able to find the ...
5
votes
1answer
2k views

Nohup over ssh won't return

I am trying to do [me@myPc]$ ssh me@server "nohup myBashScript.sh &" My goal is to launch the process on the server, and then immediately return. It is not working: The job is started on ...
5
votes
2answers
936 views

cygwin ssh shortcut on windows desktop

I have multiple servers that I need to remote into. I prefer Cygwin over Putty to do so. Anyhows - the process of opening my cool Mintty window and then typing the following commands takes too long. ...
5
votes
1answer
147 views

How are Ciphers, MACs and Key exchange algorithms negotiated by OpenSSH?

Looking at the man page for sshd_config I see the default list of algorithms for Ciphers, Key Exchange (KEX) and MACs. In my set up, I have selected a subset of these algorithms for use (i.e. I don't ...
4
votes
3answers
3k views

Configure OSX Firewall to Allow SSH Server?

If I turn on my OSX firewall, ssh is disallowed. If I turn it off, ssh can connect just fine. These are the settings from the ssh host: while I don't know what I'm doing, I figured that giving ...
4
votes
1answer
2k views

Can I change the filename of my ssh public/private key pair?

I created a public/private key pair: ssh-keygen -t rsa -C "me@example.com" I gave a different key file name than id_rsa since I wanted to create a new separate key from my normal identity. I gave ...
4
votes
1answer
56 views

Making SSH terminate on error

I have a script that is causing a bunch of ssh -D (socks proxy) connections to open. Sometimes one of them is trying to open on a port that is in use, in which case it prints an error. ...
4
votes
2answers
1k views

How do I forward a SSH port from any interface to a specific IP?

Here's the scenario: I have a desktop, running Windows 7 Ultimate. This desktop has VMware Workstation on it, and a virtual machine running a custom linux, that has OpenSSH installed and working. ...
4
votes
2answers
682 views

SSH remote login without password is very slow

SSH Client - Mac OS X Lion SSH Server - Debian /etc/hosts on Mac -> [IP of Debian] mydebian Public key of Mac has already been put to authorized_key in root@mydebian:/root/.ssh 'UseDNS no' has been ...
4
votes
1answer
2k views

How to reduce latency with openssh?

I'm ssh-ing to a server several thousands kilometers away, and every keystroke takes 500-800ms, so it is getting annoying. Is it possible to have my ssh client cache each line I type locally and ...
4
votes
1answer
1k views

What is a GPG with “authenticate” capability used for?

GnuPG subkeys can be flagged with three kind of capabilities: Sign, Encrypt and Authenticate. While the first two actions are widely used and documented, the authenticate action is somehow ...
4
votes
1answer
2k views

How to diagnose proxy over ssh?

Recently I've tried to set up proxy using ssh -D 2454 username@servername (to browse the Internet through ssh tunnel), but failed to do this correctly. I would be happy for any suggestions and/or ...
4
votes
2answers
3k views

Cannot connect to my mac via SSH

I want to open a connection to my mac (10.8) via SSH. An SSH-server is installed by default on OSX. Remote login is enabled, so the service is running and I can connect to to localhost via ssh. ...
3
votes
3answers
8k views

One user can use SSHFS, other user gets “remote host has disconnected”

I have two users with valid SSH accounts on a server. Both users can login via ssh successfully. When trying to mount SSHFS, usera can mount with no problems, while userb gets the error: remote host ...
3
votes
2answers
1k views

How to stop adding IP from EC2 to known_hosts for ssh?

I start/stop lots of new instances as I'm learning to use Amazon EC2. Every temporary instance is added to the known_hosts file. Is this ever a problem for others who use EC2 a lot? I'd like to tell ...
3
votes
2answers
3k views

1and1 ssh - connection refused

I'm having troubles connecting through SSH to my 1&1 account. When I try to connect with command userXXX@host -p22 -vv I have the following output: OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL ...
3
votes
1answer
1k views

OpenSSH public key structure

Let's say that my username is user and my computername is cmp. I notice they are also part of my SSH public key: (they are last, scroll right) user@cmp:~/.ssh$ ls config id_rsa id_rsa.pub ...
3
votes
1answer
4k views

File encryption in a bash script without explicity providing password

I want to automate the following manual process. Currently, I am encryptying a set of files using openssl as follows: Encrypt file.txt to file.out using 256-bit AES in CBC mode $ openssl enc ...
3
votes
3answers
6k views

SSH public keys not working

I've spent a few hours trying to solve this, but have gotten nowhere. The server is running CentOS 6 and using OpenSSH. The client is running OpenSSH too. I created a public key on the client (my ...
3
votes
3answers
1k views

How to configure ssh client to automatically execute commands on connect?

I frequently connect to servers through a user I share with other colleagues, every time I connect to each server I execute a couple of commands like bash, set -o vi, etc. I would want to know if ...
3
votes
2answers
3k views

Public key in hex format, conversion to base64

Hi I'm new to cryptogragraphy and have no idea how to do this. So i get a public key from a Putty session and it looks like this: ...
3
votes
2answers
708 views

Keep alive with MyEnTunnel or other SSH-background tunnel app

I'm successfully using MyEnTunnel to forward traffic to a remote SOCKS-server. If I don't use the tunnel for a while the connection seems to turn stale, but doesn't fail, hence the browser waits for ...
3
votes
1answer
3k views

Does the right half of the rsa public key matter?

In a public key file "id_rsa.pub" generated by ssh-keygen, does the part after the == matter? I ask because when I changed "root@somedomain.com" to "root", it seems to still work. More generally, I ...
3
votes
1answer
516 views

Why would anyone install openssh-client instead of openssh-server? [closed]

I installed openssh-server on two pc's. I can connect from both from the one to the other. So if openssh-server sends as well as receives ssh, why would you install the openssh-client, just to make ...
3
votes
2answers
471 views

Automatically reconnect interactive SSH session

What's the best way to automatically reconnect an interactive SSH session to re-establish the shells on terminals? I looked at autossh but that seems to be dedicated to port forwards (which I do not ...
3
votes
2answers
1k views

Debian Squeeze 6.0.1 - configuration files missing after ssh installation

I had installed ssh but something went wrong and I uninstalled it. I removed the SSH configuration files by hand (I deleted all /etc/ssh folder). After ssh installation (I mean apt-get install ssh) I ...
3
votes
1answer
3k views

Connecting FileZilla to SFTP, OpenSSH

I've a Ubuntu machine where is installed OpenSSH. I want upload/download files there thru SFTP with FileZilla. SSH works good with putty etc, but when I try to connect with FileZilla, I get Status: ...
3
votes
1answer
255 views

OpenSSH ~/.ssh/config host-specific overrides not working

I've tried setting up my ~/.ssh/config file with the help of this guide. However, the host-specific User override has no effect and ssh tries to connect using the global username instead of the ...
3
votes
1answer
3k views

git pull does nothing / git push just hangs / debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

I had an issue in ubuntu 13.10 and 12.10 where attempting to connect to github (git clone / pull / push or anything) would fail with no output. I checked my /.ssh directory for config and any ssh ...