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.

learn more… | top users | synonyms (2)

0
votes
2answers
10 views

Perform an automated scp on a Windows server

I need to perform to automate (every two hours) a scp from a windows 2012 server to a linux server. I know how to do from a Linux server to another Linux server(ssh and cron). On Windows, what tool ...
1
vote
0answers
21 views

Monitoring failed ssh logins with pam and bash?

I modified /etc/pam.d/common-auth to run a bash script when a login fails or when a login is successful and it works for successful logins but not failed login attempts when trying to ssh. Once I am ...
0
votes
2answers
1k views

How can I ssh into a vagrant virtualbox VM from an external machine?

I'm trying to set up a server on my desktop with vagrant, but while I can ssh (via PuTTY) into the VM at localhost:2222, I can't ssh into it via my local or public IP addresses - even though I have ...
9
votes
5answers
29k views

SSH / SSHD - How do I set max login attempts?

What is the easiest way to setup max login attempts in a LAMP environment (sshd installed via yum)? Is there a package or simple firewall rule?
0
votes
2answers
33 views

Proper way to send SSH commands to multiple clients with sudo?

I have created a very simple shell script to send SSH commands to multiple hosts. Right now I have copied my ssh id so I don't have to use a password to login to the servers. But if I want to do a ...
2
votes
3answers
1k views

Setting up a chroot sftp on debian server

I'm trying to allow a user "user" to access my server by either sftp or ssh. I want to jail them into a directory with chroot. I read the instructions here however it does not work. I did the ...
3
votes
3answers
2k views

CYGWin and sshd. Accepts authentication, but won't connect

Everything I find relating to this is the "ssh-exchange-identification:" error. This doesn't happen for me. I get two lines: Connection to localhost closed by remote host. Connection to localhost ...
1
vote
1answer
35 views
+100

Changing password of a sftp chrootDirectory stops it from logging in

So I have a chrootdir setup in sshd_config to a folder, and the user myuser, it's been working fine for months, then today I wanted to change myuser's password, so I did this with passwd, then ...
4
votes
4answers
1k views

Prevent SSH connection lost after logging into VPN on server machine

I encountered an issue that I can't deal with. When I'm logged onto an VPS over SSH and try to estabilish VPN connection on that VPS, the SSH connection between VPS and my machine get lost. I assume ...
32
votes
5answers
3k views

Is logging in as a shared user a bad habit?

I've worked in organizations where instead of creating a new Ubuntu user per person that wants to log into a machine, the sysadmins simply add the ssh key of each user to .ssh/authorized_keys, and ...
0
votes
1answer
4k views

rsync: getcwd(): No such file or directory (2)

I want to sync Server1 and Server2's logs to LogServer. For Server1: rsync -avz -e 'ssh -p 2188' user@server1:/usr/local/servers/logs/* /usr/local/logs/ This one works, but for Server2: rsync ...
0
votes
2answers
27 views

SSH failing for jailed account

I tried to setup a chroot jail for a user account I specifically setup for ssh. I set it up and it seemed to work fine yesterday but today it is not working. It doesn't seem to be an SSH issue since ...
1
vote
1answer
35 views
+50

Galera Rsync SST Secured via SSL/SSH

Is it possible to secure Galera Cluster SST via rsync with SSL/SSH? This page suggests it is not, specifically the following quote: Unlike rsync, xtrabackup includes support for SSL encryption ...
-1
votes
2answers
19 views

Why can't I connect to a new Ubuntu server?

I'm trying to connect to a new Ubuntu server. I was using the hardware of this server previously (with Desktop Ubuntu) before installing Ubuntu server. Do you know what can be happening? ...
1
vote
2answers
2k views

SSH connection times out

Given: vm - a WinXPsp3 virtual machine hosted by a Win7sp1 physical machine alice is the user on vm srv - a Win2008R2sp1 server bob is the user on srv quake - a linux server mark is the user on ...
9
votes
9answers
26k views

Amazon EC2 - No SSH After Reboot, Connection Refused

I've replicated this two or three times, so I'm guessing there's something wrong with what I'm doing. Here are my steps: Launch new instance via EC2 Management console using: Ubuntu Server 13.10 - ...
2
votes
0answers
26 views

Mac OSX - SSHD partially broken after El Capitan Upgrade

I recently upgraded my firm's Mac Mini device to El Capitan from Yosemite, and encountered several issues during the upgrade. I've gotten most of them resolved but one that's still failing is the SSH ...
0
votes
2answers
1k views

Forced per-user ssh port

I want to allow access to each user on a server through a different port. For example; user1 can only be accessed by ssh through port 2201, user 2 can only be accessed through port 2202. I have ...
4
votes
4answers
904 views

fail2ban bans me after a series of *successful* logins

I created a passwordless ssh login for one of my servers by using the authorized_keys file. The server has fail2ban on it, and I noticed that after several successful logins I could no longer log in ...
2
votes
0answers
46 views

Allow ssh when g+w on user's home directory

Is it possible to allow one user to connect via SSH when that user's home directory is g+w? As I understand it, I can allow this if I set StrictModes no in /etc/ssh/sshd_config, but that would mean ...
0
votes
2answers
528 views

SSH connection lost after random time interval, both sides claim the other closed the connection

I'm connecting to a virtual solaris machine from the windows host system running virtual box. This works for a while but after some time the connection vanishes. The stange thing is that sshd claims ...
0
votes
0answers
4 views

How to programmatically change a password on an IPSwitch server using a Linux client? [migrated]

One of my companies customers runs an IPSwitch sftp server, and they have disallowed public key authentication, and require us to change our password every 90 days. The problem is that, I cannot see ...
4
votes
3answers
2k views

How to make ansible use password if key was rejected?

My new server instances are configured to login on root via ssh with password. I want my playbook to reconfigure it to use keys instead and disable root login with password on first run, so I need ...
1
vote
0answers
32 views

SSH alternative for a long range/high latency connection [migrated]

I'm about to set-up a raspberrypi in a remote location (300+km to me). It will connect via GSM since there's no landline on 3G/4G. I need a way to "ssh" inside the pi to manage some stuff. Since GSM ...
0
votes
0answers
25 views

Ansible log in as regular user and become root

using the new "become" syntax, how do you configure your playbook to log in to a host as a regular user, switch to the root user and ask for a password? I tried: --- - hosts: foo gather_facts: no ...
3
votes
4answers
5k views

sshd tries reverse DNS lookups with UseDNS no

sshd seems to almost always try to perform a reverse DNS lookup on new connections. For hosts without a PTR entry this causes delays of 5 seconds per query. Sometimes it accepts the connection ...
0
votes
1answer
31 views

Countless (defunct?) SSH processes -how do stop it from happening?

My vServer hoster threatens to cancel our contract if I don't stop creating thousands (9000 to be precise) of SSH processes. I don't know if they made the processes defunct or if they were like this ...
5
votes
1answer
5k views

SSH - cannot start sftp-server when trying to force internal sftp

i'm having trouble forcing users to only be able to use sftp when connecting over ssh. I have the following lines in my /etc/ssh/sshd_config: Subsystem sftp /usr/libexec/openssh/sftp-server Match ...
0
votes
1answer
26 views

How to remove injected code between two strings recursively in PHP files using SSH

We have in-house Linux(Ubuntu) development server. Few days ago suspicious code was injected. Just to mention here that we have more than 300 projects. Code is injected in almost every file ...
1
vote
1answer
24 views

passwordless ssh in VM - weird authorized keys file

I am trying to setup passwordless ssh to my localhost (itself). I have host machine PM1 and then I lauch a VM(vm1) using qemu-kvm and logged into VM. Then, I am trying to setup passworless ssh within ...
9
votes
3answers
5k views

Trying to get SSH with public key (no password) + google authenticator working on Ubuntu 14.04.1

I'm using Ubuntu 14.04.1 (with OpenSSH 6.6 and libpam-google-authenticator 20130529-2). I'm trying to set up SSH logins where the public key authenticates (without a password) and a user is prompted ...
0
votes
0answers
12 views

Dependencies in openssh-server package in LXC container in Ubuntu 14.04 LTS

Hi I've been fiddling with Lxc containers in Linux and find it an invaluable resource for testing and dev purposes. Here's my problem. I have a just-installed container and when I try to install ...
1
vote
3answers
3k views

ssh hangs on “Last login” line

This happened for the first time three days ago - I ssh to the server, authenticate using a password, get the welcome message but it remains hanging on the "Last login:..." line. The command line ...
-3
votes
0answers
25 views

How to write access command with credentials? [on hold]

We had a third party company setup servers and built services for us years ago. But the relationship is strained now and basically they won't reply any email to us. We could find some legal help but ...
2
votes
1answer
34 views

How to disable sftp access to user with ssh already disabled (user shell = /bin/false, but connection still works with sftp)

In sshd_config, by default, login is allowed for all groups and users. The allow/deny directives are processed in the following order: DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups. ...
4
votes
2answers
1k views

How to set up two-factor authentication with OTP on FreeBSD?

I have a FreeBSD server that I like to be able to get to from anywhere. Normally I use SSH publickey to log in, or if I don't have my SSH private key available then I might use regular password over ...
0
votes
1answer
3k views

Cannot SSH to Azure Linux VM from terminal

ssh azureuser@xxx.cloudapp.net : 22 when I connect and enter the password I created, then it just goes back to the local prompt and does not actually show the remote prompt. I'm thinking I need to ...
-1
votes
0answers
17 views

openssh-server wont install on linux server, any ideas? [duplicate]

So, my server recently got broken into, and to stop any possible sshd backdoors, I attempted to reinstall openssh-server... this broke ssh. I'm still connected, but cannot reconnect from another ...
1
vote
1answer
17 views

Scalable remote access gateway for 20K+ servers

Consider a worldwide distribution of thousands of embedded servers, and clusters of servers behind firewalls that sysadmin wants to access remotely. With a focus on a remote access for login and ...
0
votes
2answers
2k views

Chef: Knife ssh connection error

I try to run a command on all my nodes but get the following error. The chef docs say it should work like this. me$ sudo knife ssh "name:*" "uptime" -x myuser WARNING: Failed to connect to -- ...
1
vote
2answers
3k views

Can I regenerate the rsa key for SSH access to a Cisco router? Or should I completely erase the SSH config?

I have a production 2691 that I administer via telnet. I'd like to change that to SSH. Looking at the config, it looks like there have been keys generated in the past. I think the history here is ...
-2
votes
0answers
24 views

While loop failing without completing the action completely - must be stdin issue

Seeking experts help to fix stdin issue permanently, I was able to query using while loop with manually directing stdin (please see example below). Are there any method to specify in .profile or ...
7
votes
4answers
66k views

SSH: Permission denied (publickey,gssapi-with-mic,password)

==================================================================== UPDATE: It turned out the configuration of sshd on host2 wont allow password login. Thanks to people answered this. ...
0
votes
1answer
422 views

Can't ssh into Centos vm in Openstack

In Openstack, I can spawn ubuntu and fedora images and ssh into them. But when I am trying the same with Centos image (6.5 or 7), then my key is refused (or even ignored) and I am proposed to use ...
-2
votes
0answers
32 views

Using Screens with a PHP Script [migrated]

I found an external developer to make me a PHP script to 'snipe' Mineraft usernames. In order for it to operate, I have to start the script from the command line using this: php -f sniper.php > ...
3
votes
2answers
430 views

How to SSH to a remote server using a private key on Linux?

I have been trying to connect to a remote server using my private key file from the terminal, but it doesn't seem to work. I don't understand why. Here is how I do it: $ ssh -i private.ppk ...
1
vote
1answer
38 views

OpenSSH use (public key or password) + google authenticator

I want to allow these two authentication types: public key + google authenticator OR password + google authenticator. I have the following in my sshd_config: AuthenticationMethods ...
1
vote
1answer
1k views

How to use an SSH Gateway with Chef's Knife Bootstrap

I'm just getting started with Chef and have a few nodes in a private network that I need to first ssh into a gateway node to gain access to. For the moment i'm using purely password based ...
0
votes
0answers
20 views

One SSH client can only connect through port 22, not other ports, on any remote server

I have a client server under Debian Wheezy. It can not connect to a server that has a special opened port for ssh (let us say 2222). All other clients I use (from other sites) can connect to my ...
14
votes
3answers
9k views

OpenSSH: Difference between internal-sftp and sftp-server

Why are there two ways to setup SFTP with OpenSSH and when to use which? Is there any difference between them? I mean the first one is using a lib from OpenSSH and the second one says "use the ...