Secure Shell (SSH) is a protocol primarily for encrypted shell connections.

learn more… | top users | synonyms (2)

160
votes
11answers
49k views

Can I nohup/screen an already-started process?

I'm doing some test-runs of long-running data migration scripts, over SSH. Let's say I start running a script around 4 PM; now, 6 PM rolls around, and I'm cursing myself for not doing this all in ...
140
votes
14answers
155k views

How do I tell Git for Windows where to find my private RSA key?

My GIT setup runs fine in Linux, but when I try to set things up under Windows (using Git for Windows and TortoiseGit), I don't know where to put my private ssh key (or, better still, how to tell ssh ...
120
votes
4answers
4k views

Is my password compromised because I forgot to hit Enter after ssh username?

I've just tried logging into a Fedora (release 13 Goddard) server using SSH (PuTTY, Windows). For some reason the Enter after typing my username didn't go through and I typed in my password and hit ...
106
votes
9answers
90k views

What is a good SSH server to use on Windows? [closed]

In my spare time I remotely support my wife's office via VPN into a Windows Server. I am about to purchase a wireless broadband service which doesn't support VPN. I don't want to open up the remote ...
105
votes
13answers
272k views

Why do I get “Permission denied (publickey)” when trying to SSH from local Ubuntu to a Amazon EC2 server?

I have an instance of an application running in the cloud on Amazon EC2 instance, and I need to connect it from my local Ubuntu. It works fine on one of local ubuntu and also laptop. I got message ...
91
votes
23answers
7k views

How do you make it obvious you are on a production system?

A few of us at my company have root access on production servers. We are looking for a good way to make it exceedingly clear when we have ssh'd in. A few ideas we have had are: Bright red prompt ...
83
votes
9answers
19k views

Keeping a linux process running after I logout

I'm connecting to a linux machine through SSH, because I'm trying to run a heavy bash script that makes filesystem operations, and it's expected to keep running for hours. But I cannot leave the SSH ...
83
votes
6answers
25k views

SSH keypair generation: RSA or DSA?

SSH supports two signature algorithms for key pairs: RSA and DSA. Which is preferred, if any? For RSA, what is the minimum acceptable key length?
82
votes
1answer
17k views

Create a public SSH key from the private key?

Let's suppose I have a SSH key, but I've deleted the public key part. I have the private key part. Is there some way I can regenerate the public key part?
66
votes
3answers
31k views

What's the difference between authorized_keys and authorized_keys2?

Just wanted a quick summary of the differences between them and why there are two? Cheers
65
votes
14answers
3k views

What's wrong with always being root?

I have a feeling this is a stupid question, but this is something I've wondered for awhile. I have a VPS and this is my first big linux venture. I am the only person who has access to it. My question ...
59
votes
15answers
8k views

Hundreds of failed ssh logins

Every night I get hundreds, sometimes thousands, of failed ssh logins on my RedHat 4 server. For firewall reasons from remote sites, I need to run on the standard port. Is there anything I should be ...
55
votes
8answers
122k views

How to automate SSH login with password?

How to automate SSH login with password? I'm configuring my test VM, so heavy security is not considered. SSH chosen for acceptable security with minimal configuration. ex) echo password | ssh ...
55
votes
8answers
20k views

ssh-agent forwarding and sudo to another user

If I have a server A into which I can login with my ssh key and I have the ability to "sudo su - otheruser", I lose key forwarding, because the env variables are removed and the socket is only ...
53
votes
13answers
54k views

How to reconnect to a disconnected ssh session

Is there a way to connect to an ssh session that was disconnected? We are having problems with our network connection to a remote site that we are working on separately; however, in the mean time we ...
49
votes
3answers
37k views

how to disable SSH login with password for some users?

On Linux (Debian Squeeze) I would like to disable SSH login using password to some users (selected group or all users except root). But I do not want to disable login using certificate for them. ...
40
votes
2answers
44k views

SFTP logging: is there a way?

I'm wondering if there is a way to log commands received by the server. It can be all SSH commands, as long as it includes information on commands related to file transfer. I'm having issues with an ...
39
votes
1answer
18k views

How do I change my private key passphrase?

I have an existing public/private key pair, the private key is password protected, the encryption may be either RSA or DSA. These keys are the kind you generate with ssh-keygen and generally store ...
38
votes
15answers
4k views

Preventing brute force attacks against ssh?

What tool or technique do you use to prevent brute force attacks against your ssh port. I noticed in my Security logs, that I have millions of attempts to login as various users through ssh. This is ...
36
votes
22answers
12k views

Why change default ssh port? [closed]

I've noticed that a lot of admins change the default ssh port. Is there any rational reason to do so?
35
votes
4answers
38k views

Can I automatically add a new host to known_hosts?

Here's my situation; I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via SSH. The virtual machines will ...
34
votes
9answers
8k views

Why is SSH password authentication a security risk?

Most guides for OpenSSH configuration advise to disable password authentication in favor of key-based authentication. But in my opinion password authentication has a significant advantage: an ability ...
33
votes
5answers
7k views

Best system for managing ssh keys?

I've got several client computers (i.e. laptops, desktops, etc.), and I connect to several server machines that I manage, and I log into them all via SSH. I can imagine several schemes of managing ...
32
votes
5answers
23k views

“POSSIBLE BREAK-IN ATTEMPT!” in /var/log/secure — what does this mean?

I've got a CentOS 5.x box running on a VPS platform. My VPS host misinterpreted a support inquiry I had about connectivity and effectively flushed some iptables rules. This resulted in ssh listening ...
32
votes
4answers
9k views

Why do consoles sometimes hang forever when SSH connection breaks?

I've seen this with so many consoles (on Linux, Mac, ...), and with lots of different machines in many different networks. I can never pinpoint the exact reason, why this happens: All you have to do ...
31
votes
5answers
2k views

Smoothest workflow to handle SSH host verification errors?

This is a simple issue that we all face and probably resolve manually without giving much thought. As servers change, are re-provisioned, or IP addresses reallocated, we receive the SSH host ...
31
votes
1answer
17k views

SSH use only my password, Ignore my ssh key, don't prompt me for a passphrase

This is a question regarding the OpenSSH client on Linux, MacOSX and FreeBSD. Normally, I log into systems using my SSH key. Occasionally, I want my SSH client to ignore my SSH key and use a ...
30
votes
8answers
35k views

How to change sshd port on Mac OS X?

I want to change sshd's port on Mac OS X from default 22 to 32, but editing /etc/sshd_config seems does not work. How can I change it?
30
votes
8answers
45k views

SSH via PowerShell

Is it possible to open an SSH session in PowerShell? Currently I use PuTTY but it would be nice if that were not required.
29
votes
4answers
19k views

How can I launch a screen session with a command over ssh on a remote server from my desktop?

I want to be able to launch screen sessions on remote servers from a single ssh command on my desktop. However, screen seems to need a terminal, which is not available when running a command through ...
29
votes
3answers
18k views

What's best practice for communication between Amazon EC2 instances?

I've been setting up Amazon EC2 instances for an upcoming project. They are all micro instances, running Ubuntu Server 64bit. Here's what I've setup so far: Web Server -- Apache Database Server ...
27
votes
16answers
26k views

Why Block Port 22 Outbound?

I'm a programmer, and I have worked for a few clients whose networks block outgoing connections on port 22. Considering that programmers often need to use port 22 for ssh, this seems like a ...
27
votes
8answers
3k views

What are best practices for managing SSH keys in a team?

I work with small teams (<10) of developers and admins with the following characteristics: Most members of the team have >1 personal computer, most of which are portable Team members have access ...
26
votes
7answers
4k views

SSH: Two Factor Authentication

I currently have a Ubuntu Server 12.04 running OpenSSH along with Samba and a few other services. At the current time I have public key authentication set up, and I'm wondering if it's possible to set ...
25
votes
3answers
3k views

Does getting disconnected from an SSH session kill your programs?

So, say I get disconnected from an SSH-session after I've started rsync or cp or any other command that can be long running. Does that command keep running until it's finished after I get disconnected ...
24
votes
8answers
12k views

Allow SCP but not actual login using SSH

Is there any way to configure a user on a Linux box (Centos 5.2 in this case) so that they can use scp to retrieve files, but can't actually login to the server using SSH?
24
votes
8answers
5k views

How do you setup ssh to authenticate using keys instead of a username / password?

How do you setup ssh to authenticate a user using keys instead of a username / password?
24
votes
6answers
8k views

How do I do Multihop SCP transfers?

I want to copy a file from my machine A to server C, but only have access to server C through server B. Instead of first transferring to server B, log in and then transfer to server C, Is is possible ...
23
votes
11answers
33k views

Can't get SSH public key authentication to work

My server is running CentOS 5.3. I'm on a Mac running Leopard. I don't know which is responsible for this: I can log on to my server just fine via password authentication. I've gone through all of ...
22
votes
2answers
56k views

How to check sshd log?

I have Ubuntu 9.10 installed with sshd and i can successfully connect to it using login and password. I have configured an RSA key login and now have "Server refused our key" as expected. Ok, now i ...
21
votes
4answers
7k views

How do I make ssh fail rather than prompt for a password if the public-key authentication fails?

I've got a script that ssh'es several servers using public key authentication. One of the servers has stopped letting the script log in due to a configuration issue, which means that the script gets ...
20
votes
4answers
4k views

Centralized management system for SSH keys?

We are looking to switch to key-based management of SSH logins, and wonder if there any key-management systems which would allow us to centrally manage the access keys world-wide. The system should ...
20
votes
1answer
648 views

Why does sshd(openssh) create two processes per connection?

before login: $ ps -elf | grep sshd 5 S root 26135 1 0 80 0 - 13115 ? 17:26 ? 00:00:00 /usr/sbin/sshd 0 S test 26480 21337 0 80 0 - 4154 - 18:41 pts/27 ...
20
votes
7answers
19k views

How to setup ssh's umask for all type of connections

I've been searching for a way to setup OpenSSH's umask to 0027 in a consistent way across all connection types. By connection types I'm referring to: sftp scp ssh hostname ssh hostname program ...
20
votes
3answers
24k views

What does “Warning: untrusted X11 forwarding setup failed: xauth key data not generated” mean when ssh'ing with -X?

When I use ssh -X on my Mac (running OS X 10.6.7) to connect to my Ubuntu (11.04) box, I get the following warning: Warning: untrusted X11 forwarding setup failed: xauth key data not generated ...
19
votes
2answers
363 views

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---> ...
19
votes
1answer
8k views

ssh hostname returns “Bad owner or permissions on ~/.ssh/config”

When I try to ssh to another box, I get this strange error $ ssh hostname Bad owner or permissions on ~/.ssh/config But I made sure that I own and have rw permissions on the file: ls -la ~/.ssh/ ...
19
votes
6answers
11k views

How can I set proxy for subversion with ssh tunnel?

I want to check out/update the code via proxy since my local connection is slow. I setup ssh tunnel : ssh -D 8090 user@ssh.proxy.net to forward all the packets to my localhost:8090. How can I set up ...
19
votes
6answers
6k views

Can I use PLink and Pageant with Cygwin's ssh?

I'm now using msysgit because of the GUI tools, which use Putty's Pageant and PLink utilities, but I use Cygwin as a general SSH terminal. I had been using ssh-agent on Cygwin, but that means I have ...
18
votes
7answers
6k views

How to configure a shortcut for an SSH connection through a SSH tunnel

My company production servers (FOO, BAR...) are located behind two gateway servers (A, B). In order to connect to server FOO, I have to open a ssh connection with server A or B with my username ...