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
40
votes
34 answers

Best smartphone for sysadmins?

I need a cell phone that will help me keep an eye on my servers and services when I am away from my computer/desk/workplace. Which smart phone would you recommend for sysadmins? An SSH client is a must. I haven't used an iPhone, but I guess having…
Fh.
  • 345
  • 4
  • 9
39
votes
3 answers

Suppressing ssh banner from OpenSSH client

I am logging into a server which has an ssh banner set. I would like to suppress it (especially for non-interactive use). I do not have access to the server sshd_config. The best solution I have found so far is to set the LogLevel ERROR option on…
Michael Hoffman
  • 503
  • 1
  • 4
  • 6
39
votes
9 answers

Auto accept rsa key fingerprint from command line

I've tried yes | ssh root@10.x.x.x to try to accept the RSA key fingerprint, but am still prompted if I'm sure I want to connect. Is there a way to make this automatic?
VenomFangs
  • 647
  • 2
  • 7
  • 10
38
votes
7 answers

Ssh, run a command on login, and then Stay Logged In?

I tried this with expect, but it didn't work: it closed the connection at the end. Can we run a script via ssh which will log into remote machines, run a command, and not disconnect? So ssh in a machine, cd to such and such a directory, and then run…
jonathan
  • 381
  • 1
  • 3
  • 3
38
votes
2 answers

Is there a security risk to disclosing your SSH known_hosts file?

I'm speaking at a conference next week about some software tools I've created. My laptop will be shown on a projector screen during this presentation. The presentation will be videotaped and posted on youtube. If, for some reason, I have occasion…
Matt Korostoff
  • 495
  • 4
  • 7
38
votes
7 answers

Unable to ssh to GCE: "Permission denied (publickey)"

I created a VM via Bitnami in Google Compute Engine. Previously, I was able to ssh via the Bitnami web interface. I tried to ssh via terminal on my Mac but kept getting the Permission denied (publickey) error. I then deleted all keys on the server…
NEO
  • 781
  • 1
  • 7
  • 10
38
votes
6 answers

How to use both AllowGroups and AllowUsers in sshd_config?

I'm trying to modify /etc/ssh/sshd_config on my dedicated debian7 server with both AllowUsers and AllowGroups. However I can't seem get both to work together. The Setup There's a user called testuser. That user is in a group called ssh-users: $…
Johannes
  • 483
  • 1
  • 4
  • 9
38
votes
13 answers

SSH client option to suppress server banners?

I've read Stop ssh login from printing motd from the client?, however my situation is a bit different : I want to keep Banner /path/to/sometxt serverside I would like to pass an option under specific conditions so that Banner is not printed (eg ssh…
user130370
38
votes
16 answers

How to bring .vimrc around when I SSH?

My work tends to involves using SSH to connect to various machines, and then using vim to edit files on those machines. The problem is that I have to constantly copy my .vimrc file around. It's very annoying to open vim and not have any settings. Is…
Apreche
  • 1,405
  • 5
  • 17
  • 20
38
votes
2 answers

Is a central location for authorized_keys a good idea?

I'm in the process of configuring a cloud server to run the following stack: Ruby, Passenger, Apache; under Ubuntu 10.04 (Lucid Lynx). In the process of wanting to make the server easier to manage I setup RSA keys on root, and www-data so that I…
Gavin Miller
  • 585
  • 2
  • 6
  • 9
38
votes
4 answers

ssh: "Agent admitted failure to sign using the key"

I'm trying to set up password-less login with ssh on Ubuntu Server, but I keep getting: Agent admitted failure to sign using the key and prompt for password. I have generated new rsa keys. Before the system reboot it worked just fine. All the…
takeshin
  • 1,471
  • 3
  • 21
  • 28
37
votes
3 answers

How can I match a CIDR range for an SSH config host entry?

I'm looking for a way to use specific CIDR blocks to match hosts in the SSH client configuration (usually ~/.ssh/config). For example, I have an entry to forward all traffic through a bastion host if the IP falls into a certain range, let's say…
fazy
  • 770
  • 3
  • 8
  • 13
37
votes
2 answers

ssh-copy-id specifying which key and without password

I have a public key in a server(host) that I want to transfer to another server(target). The host server has a bunch of keys in .ssh/ folder, i want to copy just one of them to the target server (it's not id_rsa.pub, so lets call…
Lucas Mattos
  • 483
  • 1
  • 4
  • 5
37
votes
10 answers

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 The difference between 3. and 4. is that the former…
Unode
  • 483
  • 1
  • 6
  • 11
37
votes
8 answers

SSH into a box with a frequently changed IP

I have some cloud boxes that change their IP frequently. I ssh using the hostname but have to edit the known_hosts file every time the server launches because of this error message: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ …
coneybeare
  • 621
  • 1
  • 7
  • 14