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.

Filter by
Sorted by
Tagged with
1 vote
3 answers
520 views

Allow SSH but disallow SFTP?

Requirement: Allow SSH but disallow SFTP to a particular user group. Once disallowed, if the user group tries to access SFTP, it should not be allowed and all connections should be closed and the ...
4 votes
2 answers
5k views

Duplicity - how to put passphrase in command?

I've tried a number of obvious commands as detailed in Duplicity Man page to do this but it doesn't seem to work. Scenario I'm SSH'ing to a machine, then running Duplicity; below is the command, of ...
2 votes
2 answers
3k views

Adding a new user into linux from a script

I am using a customized Redmine installation to manage projects. I have managed to hook the addition of new users and send the login information to a bash script I have. Below is my script: #!/bin/sh ...
6 votes
4 answers
14k views

Is it possible to connect a EC2 Linux instance via ssh without the key pair?

I can connect to my EC2 Linux instance via ssh using the key pair (*.pem). Is it somehow possible to connect it with ssh with out the pem file?
1 vote
3 answers
4k views

Applications to tail httpd logs over ssh in windows besides a ssh terminal [closed]

I'm looking for something like baretail with ssh support or the ability to read from standard input so I can pipe the output of plink. Does anyone have any suggestions.
0 votes
1 answer
350 views

remote script execution from local script linux doesn't stop for remote script prompts

script abc.sh is on machine M1 and xyz.sh is on machine M2 script abc.sh: #!/bin/bash ssh -l user1 host.com ./xyz.sh -b1 arg1 -b2 arg2 script xyz has certain user prompts like pwd etc When I ...
0 votes
1 answer
3k views

How can I enter a passphrase in command line using git?

I am using git in my development environment. When I run the command git pull origin master is there any way to pass the passphrase from the command line.
2 votes
2 answers
1k views

What are the disadvantages when using two-factor authentication on SSH like Authy-SSH?

I'm considering to setup Two Factor Authentication on my SSH accounts (OpenSSH, Ubuntu). I was looking into Authy-SSH but I'm wondering what the possible disadvantages are? Also, can I lock myself ...
-1 votes
1 answer
535 views

rsync to remote ssh or to local iscsi

I'm curious of anyone knows a link to or can elaborate upon this design question: I have a server that I would like to make a backup copy of data from. I have a second server that is iscsi-enabled. ...
0 votes
0 answers
833 views

Why is my sshd looking for a wrong kvno in keytab?

My FreeBSD box is using Heimdal Kerberos-implementation. It is registered with the corporate AD, its msDS-KeyVersionNumber-attribute is set to 2, and its keytab has the following entries: FILE:/etc/...
5 votes
1 answer
553 views

Strange behaviour ssh -> bash --> (tty no echo) --> c program?

At job we have an old C program which works with industrial hand terminals from Honeywell. That terminal has its own ssh client to connect to a linux redhat 6.6 server. Once it is connected to the ...
0 votes
1 answer
743 views

SSH to ESXi server with Expect immediately closes

I am writing a VM deployment tool that needed to start VMs on an ESXi server. To do this I am using Perl's Expect module to spawn an ssh client to connect to the server and use vim-cmd to manage the ...
2 votes
1 answer
2k views

How to limit access from host to docker container

I am new to docker. I setup a container which run a web application at port 3333. it works well. By default we could access container bash from host without password. I share the host machine with ...
0 votes
1 answer
3k views

Can I establish an SSH tunnel to elasticbeanstalk instance?

It is possible to SSH to elasticbeanstalk with eb ssh <instance>, but it doesn't seem to be possible to create a tunnel with this executable. How can I do it, if at all?
1 vote
1 answer
596 views

Why is module os_keypair not returning private_key?

I am deploying to Rackspace Cloud with the OpenStack ansible module. I am facing an issue with the SSH keypair creation. It creates the public key, and installs it on the host. However I can see that ...
0 votes
1 answer
632 views

SSH to other Azure Linux Servers from jump server

I provisioned a stack of VM's and during the process I elected to create a jump server. Now I am on the jump server trying to connect to other machines via SSH but I keep getting an error stating that ...
2 votes
1 answer
2k views

SSH connection is slow and buggy when connected by IPv6

I noticed that my SSH session is not usable (random connection errors, hugh delay, etc.) when I'm connected by IPv6. I'm not connecting to my server by IPv4/IPv6 addresses directly. I use my domain ...
1 vote
0 answers
83 views

PAM+LDAP no longer working after SLES 10.4->11.4 Upgrade

authentication via LDAP has ceased functioning after we upgraded to SLES 11.4 via recommended method (boot from DVD). Unfortunately with SLES I cannot give you any meaningful log output since neither ...
2 votes
1 answer
1k views

Server allows logging in without supplying a password and no ssh keys were exchanged, what could be the reason?

I'm trying to secure an outbound server with Google 2FA solution. For the time being, I'm first configuring everything on a local Vagrant machine and once everything works as intended I'll run it as ...
7 votes
1 answer
14k views

Issues with ssh and Ansible

When running an ansible task (with a script action), I'm getting this error message: stderr: OpenSSH_6.0p1 Debian-4+deb7u2, OpenSSL 1.0.1e 11 Feb 2013 debug1: Reading configuration data /etc/ssh/...
1 vote
2 answers
2k views

Google authenticator / SSH: multiple shared secrets per user & sharing of shared secrets over users

I would like to add Google's authenticator app to our SSH authentication toolchain, as described in this article However, it seems that the PAM module basically makes a hard link between "linux user" ...
1 vote
0 answers
363 views

libnss-ldapd and Onelogin vLDAP

I'm trying to get Onelogin's new vLDAP service working with libnss-ldapd on an Ubuntu server (14.04). It looks like vLDAP uses authenticated bind per user. I've tried lots of different configurations ...
0 votes
6 answers
7k views

SSH not working on server

I'm trying to ssh into a server and get the following error ssh: connect to host server.mylan.lan port 22: No route to host The strange thing is it was working and then suddenly no more, is this ...
0 votes
1 answer
361 views

Forward incoming SSH connection if user = git?

I have a CentOS 7 minimal with Firewalld installed and it serves as the firewall / router for the company. Inside the network, we have a git server, let's name it: gitlab-server. I wish to make it ...
1 vote
1 answer
1k views

Remote host identification has changed

I'm trying to connect serverpilot manually on a cloud server at OVH (unbuntu 16) via the terminal on my mac (ssh [email protected]) The operation failed once and now that I'm trying to re-setup it ...
9 votes
5 answers
1k views

Is setting a very strong password enough to secure an SSH on port 22?

Presuming that nobody can steal the actual password from me myself, is it practically 99.9% impossible to use SSH to crack into my server running SSH on a standard port using very strong (24 symbols ...
0 votes
1 answer
224 views

Providing root ssh access to virtual servers behind NAT? [duplicate]

We are a web hosting company. We have 4 Servers which are running OpenVZ on top of CentOS. Each of the server has around 50 containers running on top of it. We are planning to provide ssh root ...
1 vote
2 answers
203 views

Block SSH hop based on traffic origin?

Is there a way to find where the SSH traffic origins from? We have two servers A and B. A is on a private network. B has 2 nics, private and public. A can SSH into B and B can SSH into A problem is, ...
0 votes
1 answer
699 views

my ssh is OK,but mha ssh check is fail

CentOS 6.6 + MySQL MHA(0.56)\ ssh-keygen -t rsa ssh-copy-id -i /root/.ssh/id_rsa.pub root@slave2 and my SSH check is ok [root@master ~]# ssh -v root@slave2 OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb ...
2 votes
0 answers
931 views

How To Configure OpenSSH on a Windows Server 2008 to authenticate against Active Directory

I have installed OpenSSH 7.1 on a Windows server 2008R2 which also is an Active Directory Domain Controller. I need to login with SSH on this machine using credentials from Active Directory e.g., ...
2 votes
0 answers
428 views

ssh -t -t sudo displays back my password

My problem is about executing sudo over SSH. I have tried various things, but non works. Here is my script: ssh my-host /bin/bash << EOF # some commands... sudo -u my-user -s -- << EOFF ...
1 vote
0 answers
40 views

Ubuntu Samba ssh login changes after successful login

We have many Ubuntu servers running different flavors, but on some of our 14.04 versions we are having a baffling issue with ssh logons. When a user uses ssh to connect, they are prompted for their ...
1 vote
1 answer
1k views

Do incoming and outgoing ports have to match?

Our server was setup with sftp on a custom port, say, 12345. The connection could be done like so, and required the port setting: sftp -oPort 12345 user@host I understand that is at least specifying ...
5 votes
1 answer
2k views

SSH works with expired Kerberos Password

I have setup SSH - single sign on using kerberos V5. When a user password has expired , it returns 'Warning: password has expired.' and allows the user to login! I even made changes in the /etc/pam.d/...
2 votes
0 answers
403 views

How to force "intermediate" key use in a multi-hop SSH connection with agent forwarding?

I am using a multi-hop SSH connection with agent forwarding enabled at each hop. I want to connect to a destination machine (Machine D) using the key of the preceding hop, not the one from the ...
3 votes
0 answers
580 views

RDP Connection Times out Only When Connected over SSH Tunnel

I have an interesting issue. let me describe my setup: I have a server at home that serves as my Virtual Machine Host. All of the computers here are VM Computers, I don't think that makes a ...
0 votes
1 answer
1k views

Can't SSH from one Digital Ocean droplet to another using Private LAN IP [closed]

I have 2 Digital Ocean instances which have private LAN IP's. The first is 10.130.30.82 and the second is 10.130.35.154. I can ping the second from the first but not SSH. I have copied my keys to both ...
3 votes
1 answer
29k views

How to reset the sshd config to default in Linux Redhat

I need the very first version of the ssh config. Located in /etc/ssh/sshd_config. Unfortunately the current ssh config has been changed a few time by other developers and it is hard to understand ...
0 votes
1 answer
3k views

Unable to connect to Postgresql on a server

On Digital Ocean I'm able to connect to Postgresql: psql -d my_db -U my_name for which it asks me a password and I get in successfully. But from my local computer I'm unable: psql -d my_db -U ...
3 votes
1 answer
1k views

SSH works both ways, but scp and rsync only one way

I have been using SCP and rsync to transfer some files between two servers using SSH keys. Suddently SCP and rsync don't work anymore from server 1 to server 2. They don't give any error or ...
1 vote
0 answers
198 views

I'm struggling to install darkstat on an Amazon EC2 server running Amazon Linux. Any tips?

Hello and thanks in advance for reading through this question. Disclaimer: I'm still quite a newbie when it comes to managing a server. I'm running an Amazon EC2 server (which is running Amazon Linux) ...
8 votes
4 answers
13k views

root locked out of EC2

I was in the process of disabling root logins on an AWS EC2 instance. Right after setting PermitRootLogin no and restarting sshd, I closed the terminal on accident -- before setting up users with sudo ...
34 votes
7 answers
57k views

Resume command running in dropped SSH session

Reading this question got me to wondering. Assuming screen is not being used. If an SSH session on a Linux target is dropped, for whatever reason, and you reconnect before the server kills the session ...
0 votes
0 answers
60 views

SSH version 7.2 is showing up as 7.1 in client

We upgraded our Ubuntu Linux 14.04.1 to the latest OpenSSH version 7.2p2. ubuntu@ip-10-1-4-137:~$ ssh -V OpenSSH_7.2p2, OpenSSL 1.0.1f 6 Jan 2014 However, when I try to check the version from a ...
5 votes
1 answer
3k views

SSH tunnel for 3 hops and copying files

I've managed to do ssh tunnel just for two hops ssh -L 1234:serverB:22 user@serverA scp -P 1234 user@localhost:/file /file Now I need to go from localhost -> serverA - >serverB ->serverC And to ...
0 votes
1 answer
464 views

How to allow reverse ssh-tunnel connection to my host on demand?

I've set up a reverse ssh-tunnel (no autossh is used right now, but I might be using it)from remote laptop to my pc, but I don't trust much the remote host, as there might be different people using it ...
0 votes
2 answers
1k views

scp to Windows2012Server running Microsoft's OpenSSH-server port, fails with `Broken pipe`

Just installed Microsoft-blessed's OpenSSH Window port and it works great for ssh sessions from Linux clients: andrew@debian:~$ ssh 55.55.55.55 The authenticity of host '55.55.55.55 (55.55.55.55)' ...
0 votes
1 answer
2k views

Trying to restrict ssh access to domain groups

Centos 7 joined to 2012 R2 AD domain Joined to AD domain with realm join and now I can ssh in as any domain user (ssh server -l [email protected]) I want to only allow certain domain groups to ssh in ...
1 vote
4 answers
4k views

How to kill processes on a remote *nix machine

I would like to issue a kill command across many *nix machines. I'm attempting to do something like this: rsh <remotemachine> ps -ef | grep <somepattern> | awk '{print $2}' | xargs n1 -t ...
0 votes
0 answers
636 views

IP not showing in /var/log/secure under rhost

I'm trying to get Fail2Ban to block failed sudo -i commands, but the IP is not showing up in the logs. For example when I log into the server with: ssh -i ~/.ssh/id_rsa [email protected] I then use: ...

1
88 89
90
91 92
180