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
4
votes
2 answers

What do these entries in my SSH logs mean?

I recently noticed that I have entries from an unknown IP address in my SSH logs. I performed a grep to extract all entires that didn't contain my own IP address. I was presented with this: Jul 24 22:06:54 server1 sshd[8261]: Accepted publickey for…
4
votes
1 answer

Is it possible to attach a shell to an existing ssh tunnel?

I have a few SSH tunnels setup for auto-connection/re-connection with Shimo. Is there a way of attaching shell access to those existing tunnels and how if so? Or will I have to establish a new ssh connection just for shell access?
4
votes
3 answers

Run a local script on a remote server using ssh with out having to worry about quotes

So I have been running local scripts fine on a remote server: ssh user@server "`cat local-script.sh`" However, today I have a script that has both single and double quotes in it. Which causes the script to fail because the output of cat…
Michael
  • 801
  • 1
  • 7
  • 15
4
votes
1 answer

Connect to a machine in a vpn via ssh with dynamic dns

I have set up my router on my local network to use dynamic dns (no-ip) to get a "static" hostname. I have forwarded port 22 to my local pc and I can remotely log into it using ssh. I also need the machine to connect to a vpn network to reach servers…
feob
  • 143
  • 4
4
votes
2 answers

Create an SSH tunnel with authentication keys - Syntax

I have to create an SSH tunnel to connect a deployment server to an VPN: DeploymentServer --> Gateway --> PrivateServer Each machine using a key, I tried the following command: myMachine $ ssh -i GATEWAY_KEY.pem -N -L…
Guilhem Soulas
  • 251
  • 2
  • 4
  • 12
4
votes
2 answers

do SSH keys have to be unique to the service they are used for?

I just created a virtual server (or, in the language of Digital Ocean host, a 'droplet') for the first time. Digital Ocean has an instruction page about SSH keys https://www.digitalocean.com/ssh_keys tells us to check if SSH keys exist, and then it…
Michael
  • 247
  • 1
  • 3
  • 9
4
votes
2 answers

SSH: prevent from asking for passphrase when ssh-agent auth fails

I am writing a script to cycle through a list a known hostnames so as to find a working SSH server on which I can auth with my SSH key. The key is already loaded with ssh-agent and ssh-add, so if I connect to a working remote host that knows my key,…
zopieux
  • 143
  • 3
4
votes
2 answers

How can I use Puppet to maintain SSH host keys across system rebuilds?

I have a few lab environments where the computers get rebuilt on a periodic basis but need to keep the same ssh host keys so that the people who connect to the lab computers (often from their own systems not under my administration) don't get "host…
asciiphil
  • 3,086
  • 3
  • 28
  • 53
4
votes
1 answer

Limited SSH access for log retrieval

I want to have limited access to a Linux server to be able to grab a certain set of logs. Ideally, I would like to be able to run rsync locally to grab the logs from the server and for security reasons I don't want to give the user full ssh login…
Stuart Woodward
  • 1,343
  • 4
  • 14
  • 29
4
votes
1 answer

Bad owner or permissions on /root/.ssh/config

I have MASTER key under user alexus, yet whenever trying to ssh as root and/or other users on the box via sudo and getting error Bad owner or permissions on /root/.ssh/config [root@wcmisdlin02 ~]# ls -ld .ssh lrwxrwxrwx. 1 root root 17 May 14 13:00…
alexus
  • 13,112
  • 32
  • 117
  • 174
4
votes
2 answers

How to setup a public rsync and sftp server

I want to setup a public storage server which allows sftp and rsync (through ssh). I've got it working with a chroot jail and rssh. When the user connects to the server with sftp he can read all the files in the chroot jail (like /lib and /bin) in…
vdrmrt
  • 101
  • 1
  • 5
4
votes
1 answer

Virtmanager connection via custom SSH command?

I'd like to use virt-manager to manage my libvirt/kvm virtual machines running on a remote host, but the method I use to ssh into that host it a bit complicated. I need to use custom ports along with agent forwarding with multiple hops. For…
Dave
  • 607
  • 1
  • 9
  • 18
4
votes
8 answers

Send Ctrl-Alt-Del over SSH?

I know that Linux may, depending on configuration, allow the interactive user to reboot the server by pressing Ctrl-Alt-Del even without logging in. I have a remote console session over SSH to a remote server that I cannot log into, but I want to…
EMP
  • 5,172
  • 10
  • 37
  • 33
4
votes
2 answers

Restrict SSH to file transfers only

I have users transferring files to me using the same user account on my server and by adding their public keys to the authorised keys file. I want to restrict access as much as possible, such that they should only be able to create files. Is this…
Cheetah
  • 241
  • 3
  • 8
4
votes
2 answers

SSH direct stdin and stout to and from postgres client

my local can connect to remote , but it cannot connect to dbserver. remote can connect to dbserver (with psql). I want to run sql scripts from my local against the db. I am looking to a way to open a psql on the remote and direct my stdin and stdout…
Avihai Marchiano
  • 612
  • 3
  • 16
  • 32