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

learn more… | top users | synonyms (2)

60
votes
15answers
9k 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 ...
15
votes
6answers
16k views

Cygwin SSHd Autoblock Failed Logins

I'm running Cygwin with an SSH deamon on a Windows Server 2008 machine. I was looking at the Event Viewer and noticed as much as 5 to 6 failed login attempts per second (brute force) for the last week ...
168
votes
11answers
53k 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 ...
66
votes
14answers
4k 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 ...
33
votes
5answers
3k 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 ...
47
votes
2answers
53k 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 ...
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 ...
18
votes
5answers
12k views

How can I chroot ssh connections?

I would like to setup a chroot jail for most (not all) users logging in though SSH. I've heard it's possible with the latest versions of openssh, but I've not been able to find out how to do it. The ...
26
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?
6
votes
5answers
3k views

Is it worth the effort to block failed login attempts

Is it worthwhile running fail2ban, sshdfilter or similar tools, which blacklist IP addresses which attempt and fail to login? I've seen it argued that this is security theatre on a "properly ...
3
votes
4answers
642 views

ssh delay when connecting

When connecting to one specific server (running Debian Lenny) it always takes about 5 seconds before it prompts me to enter a password. After login there is no noticable delay anymore. There is also ...
70
votes
8answers
162k 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 ...
27
votes
3answers
5k 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 ...
3
votes
1answer
551 views

SFTP user can't edit or create files

Server: Ubuntu 12.04 LTS I am using openSSH and have created an SFTP user called bob who belongs to group sftponly. I have chrooted bob to his home directory which is /usr/share/nginx/www/bob/. bob ...
62
votes
12answers
64k 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 ...
19
votes
7answers
7k 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 ...
17
votes
5answers
7k views

ssh tunneling only access

Is it possible to configure ssh (on linux) to allow access for tunneling only? Ie user can setup tunnels but cannot get a shell/access files?
13
votes
5answers
25k views

How to put desired umask with SFTP?

I have a SFTP server (openssh/sftp-server) and I would like to set umask 002 for users using this service. I tried setting PAM (pam.d/common-session), and .profile for each user, but no luck. With ...
90
votes
9answers
30k views

Keeping a linux process running after I logout

I'm connecting to a Linux machine through SSH, and I'm trying to run a heavy bash script that makes filesystem operations. It's expected to keep running for hours, but I cannot leave the SSH session ...
98
votes
23answers
8k 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 ...
56
votes
6answers
51k 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 ...
19
votes
8answers
16k views

What is a good modern parallel SSH tool? [duplicate]

I have heard that pssh and clusterssh are two popular ones, but I thought I would open it to discussion here and see what the community's experiences with these tools were? What are the gotchas? Any ...
23
votes
7answers
23k 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 ...
37
votes
22answers
13k 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?
81
votes
3answers
36k 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
11
votes
9answers
1k views

SSH to a computer that will then SSH to another computer [duplicate]

Possible Duplicate: How to configure a shortcut for an SSH connection through a SSH tunnel I have a situation where I would like to have SSH/SFTP access from my workstation to a server that ...
9
votes
12answers
1k views

Securing SSH server against bruteforcing

I have a little SVN server, old dell optiplex running debian. I don't have that high demands on my server, because its just a little SVN server... but do want it to be secure. I just renewed my ...
6
votes
4answers
5k views

SSH relay server with OpenSSH

Is it possible to use OpenSSH to relay to other SSH enabled devices such as routers switches etc.. If is this something that can be done without creating a bespoke application on Linux to do it? ...
7
votes
6answers
5k views

Is there a name based virtual host SSH reverse proxy?

I've grown quite fond of HTTP reverse proxies in our development environment and found the DNS based virtual host reverse proxy quite useful. Having only one port (and the standard one) open on the ...
8
votes
4answers
4k views

How can I create a user only for sftp

I have added a user to the system via "adduser" script. Then, in the /etc/passwd file I tried changing the /bin/bash to /sbin/nologin or to /dev/null with no luck... I would like the user not having ...
11
votes
6answers
2k views

Does disabling root login enhance security?

I have recently found an argument against disabling a root user login in Linux at http://archives.neohapsis.com/archives/openbsd/2005-03/2878.html I assume that, if everybody uses a public key ...
3
votes
4answers
1k views

How to restore remote access to a RHEL system from expanded permissions set over the entire filesystem? [duplicate]

Cause of the problem I intended to add group write permission on hidden files like '.hgignore' with the following: # pwd /opt # sudo chmod -R g+w .* The problem is that '..' matched this pattern, ...
8
votes
2answers
647 views

SSH port forwarding

I want to connect to my computer(local) behind NAT through a public accessible server(public). On local: ssh -g -R 8000:localhost:22 user@public Then on public: ssh -p 8000 user@public But I ...
1
vote
5answers
3k views

SSH key exchange is not working

Is there any way to verify why SSH key exchange between 2 servers is not working? In Server A: I did the following steps: ssh-keygen –t rsa cd /.ssh cp id_rsa.pub authorized_keys Then in Server ...
1
vote
2answers
795 views

Why does my SSH passphrase work with `plink` and not `ssh`?

I've configured my router to accept a public key SSH session with a passphrase. They key pair was generated using the PuTTY tools on windows. I can open the session from both Windows and Linux ...
-1
votes
4answers
2k views

Dump all databases with SSH access

I would like to know how to dump all databases into a folder. I'm using a Linux/Debian Afer connecting on the server with root access I make $ mysql -u admin -p To connect on mysql. Then which ...
9
votes
5answers
32k views

SSH / SCP Server on Windows [duplicate]

Possible Duplicate: What is a good SSH server to use on Windows? Can anyone on the SF community recommend a trustworthy/easy to set up SCP server for windows. I do not want to go through ...
8
votes
2answers
260 views

Special SSH Configuration

At the moment in my sshd_config I have it set so that passwords cannot be used and only keys can be used to login. I need to enable passwords for one user. This user is yet to be created and has to ...
5
votes
4answers
13k views

SSH issues: Read from socket failed: Connection reset by peer

I compiled OpenSSH_6.6p1 on one of our server. I am able login via SSH to the upgraded server. But I am not able to connect to other servers running OpenSSH_6.6p1 or OpenSSH_5.8 from this. While ...
0
votes
2answers
101 views

copying a file 2 connections away?

I dislike calling scp twice. I need to connect to box1 via ssh the again to boxNAME. How do i copy a file from boxNAME to my local drive? also how do i copy a file from my local drive back to ...
60
votes
8answers
24k 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 ...
115
votes
13answers
303k 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 ...
34
votes
5answers
7k views

Best system for managing ssh keys? [closed]

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 ...
85
votes
6answers
27k 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?
28
votes
6answers
10k 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 ...
11
votes
3answers
1k views

The A to Z of setting up a Linux box for secure local hosting

I am in the process of reinstalling the OS on a machine that will be used to host a couple of applications for our business. The applications will be local only; access from external clients will be ...
28
votes
16answers
28k 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 ...
26
votes
11answers
39k 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 ...
16
votes
7answers
14k views

Monitor an incoming SSH session in real time

Is there any linux software to monitor an incoming ssh session. At a previous job I was told that if you ever needed support from Red Hat for example you could have them SSH into your machine and you ...
9
votes
3answers
2k views

Logging a “persons” activity in Linux

So I've read many of the posts related to this and have just come up more confused than before. There are recommendations for various tools including ttyrec, snoopy, acct, rootsh, sudosh, ttyrpld, ...