Questions tagged [ssh]

GENERAL SSH SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. Secure Shell (SSH) is a cryptographic network protocol for secure data communication. Use this tag for programming questions related to Secure Shell. Common authentication and configuration problems are off-topic for Stack Overflow.

Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers that it connects via a secure channel over an insecure network: a server and a client (running SSH server and SSH client programs, respectively). The protocol specification distinguishes two major versions that are referred to as SSH-1 and SSH-2.

SSH was designed as a replacement for Telnet and other insecure remote shell protocols such as the Berkeley rsh and rexec protocols, which send information, notably passwords, in plaintext, rendering them susceptible to interception and disclosure using packet analysis. The encryption used by SSH is intended to provide confidentiality and integrity of data over an unsecured network, such as the Internet, although files leaked by Edward Snowden indicate that the National Security Agency can sometimes decrypt SSH.

SSH uses public-key cryptography to authenticate the remote computer and allow it to authenticate the user, if necessary. There are several ways to use SSH; one is to use automatically generated public-private key pairs to simply encrypt a network connection and then use password authentication to log on.

Another is to use a manually generated public-private key pair to perform the authentication. This method allows users or programs to log in without having to specify a password. Anyone can produce a matching pair of different keys (public and private). The public key is placed on all computers that must allow access to the owner of the matching private key (the owner keeps the private key secret). Although authentication is based on the private key, the key itself is never transferred through the network during authentication. SSH only verifies whether the same person offering the public key also owns the matching private key.

In all versions of SSH it is important to verify unknown public keys, i.e. associate the public keys with identities, before accepting them as valid. Accepting an attacker's public key without validation will authorize an unauthorized attacker as a valid user.

Useful Links

Server Implementations

Client Implementations

Libraries

29979 questions
10
votes
2 answers

Environment variable differences when using Paramiko

I am connecting to SSH via terminal (on Mac) and run a Paramiko Python script and for some reason, the two sessions seem to behave differently. The PATH environment variable is different in these cases. This is the code I run: import paramiko ssh =…
Uri Goren
  • 13,386
  • 6
  • 58
  • 110
10
votes
3 answers

Emulate SSH server for testing purposes

I have to write test for deployment script which uploads files through SSH, but I'd like to have it not depending on external servers configuration. This is how i see it: Create 2 SSH daemons without authentication on different ports of loopback…
Dmitry Gladkov
  • 1,325
  • 1
  • 12
  • 24
10
votes
1 answer

Python Paramiko - Determine what ciphers and key-exchange algorithms are available

I have an automated SFTP program written in Python using the Paramiko library. If I make a connection, I can show what ciphers and key exchange algorithms the transport is using. However, I am not sure this is the same thing as the algorithms and…
Carl
  • 695
  • 8
  • 21
10
votes
3 answers

Ansible: Install package with pip from a private git repo

I am trying to install a package from a private git repo using ansible's pip module this way: - name: Install my package pip: name='git+ssh://git@github.com/mycompany/my-repo.git#egg=0.1.0' virtualenv=/path/to/venv But this hangs when I…
Tristan
  • 3,192
  • 3
  • 20
  • 32
10
votes
4 answers

Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password) during ambari hadoop installation

I am trying to deploy a hadoop cluster using ambari, but when i select the hostnames with FQDN and proceed to configure I get the permission denied error for ssh. STEPS: 1. generated rsa key using ssh-keygen as root. changed permission for…
Abhi.G
  • 1,801
  • 5
  • 20
  • 35
10
votes
2 answers

Intellij IDEA remotely debug java console program

I have a remote server with Java running to which i have SSH access. I am writing an app on the local machine, building it with maven. Is it possible to set the IDE Itellij IDEA to run my project remotely? The idea is : to build the jar, copy it to…
Dmitrii G.
  • 895
  • 1
  • 7
  • 21
10
votes
1 answer

Keep being prompted to enter passphrase for .ssh/id_rsa

I followed the tutorial here to set up ssh for github in cygwin on Window 7. However, every time I do git push origin master, I keep being prompted the following: Enter passphrase for /cygdrive/c/Users/mynameis/.ssh/id_rsa: This is so annoying…
mynameisJEFF
  • 4,073
  • 9
  • 50
  • 96
10
votes
2 answers

Maven won't use public key to deploy

I'm using SSH to deploy my Java artifacts to a server. I have the keys set up so that I can interactively SSH to the server without requiring a password, but when I try to run the "mvn deploy" or "mvn release:perform" commands, it hangs (at what I…
magneticMonster
  • 2,373
  • 6
  • 30
  • 46
10
votes
2 answers

Can't ssh into AWS EC2 after enabling firewall

After enabling the firewall with 'sudo ufw enable' I can no longer ssh into my ec2 instance. Any way to recover from this? I'm guessing I should have done something like 'sudo ufw allow ssh' but didn't do that before exiting the session. …
tgoneil
  • 1,522
  • 3
  • 19
  • 30
10
votes
4 answers

Clone works, remote push doesn't. Remote repository over copssh

I've "setup-a-msysgit-server-with-copssh-on-windows", following Tim Davis' guide and I was now learning how to use the git commands, following Jason Meridth's guide, and I have managed to get everything working fine, but now I can't pass the push…
Rui
  • 494
  • 1
  • 6
  • 20
10
votes
2 answers

Is it possible to do have Capistrano do a checkout over a reverse SSH tunnel?

I am developing an application that resides on a public host but whose source I must keep in a Git repository behind a corporate firewall. I'm getting very tired of the slowness of deploying via scp (copying the whole repository and shipping it over…
James A. Rosen
  • 64,193
  • 61
  • 179
  • 261
10
votes
4 answers

How can I connect to a Google Compute Engine virtual server with a GUI?

I am testing a Google Compute Engine, and I created a VM with Ubuntu OS. When I connect to it, by clicking this Connect SSH button, it opens a console window. Is that the connection you get? How do I open a real screen with a GUI on it? I don't want…
Assassinbeast
  • 1,207
  • 1
  • 17
  • 33
10
votes
5 answers

transferring 0 files using publish over SSH plugin in Jenkins

I already read this and this and this answers but non of them helped me. I am using Windows machine for Jenkins My workspace has only the following…
Dejell
  • 13,947
  • 40
  • 146
  • 229
10
votes
2 answers

How to Avoid Maven builds stall on ssh host authenticity problem?

What's the right way to keep ssh host authenticity from being a problem for maven and hudsno builds? I have hudson building my maven project on a VM. When the ESX server with my VMs on it is taxed some of my jobs will stall out stuck in a loop of…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
10
votes
1 answer

How can I tell composer which key to use for a given composer repository?

I have the following situation: I have a project hosted on a private repository on bitbucket, for which I use deployment key #1. In this project's composer file is a dependency hosted on a satis repository, and is pulled through another private…
Tudor
  • 1,798
  • 2
  • 12
  • 21
1 2 3
99
100