Secure Shell (SSH) is a protocol primarily for encrypted shell connections.

learn more… | top users | synonyms (2)

19
votes
6answers
11k views

How can I set proxy for subversion with ssh tunnel?

I want to check out/update the code via proxy since my local connection is slow. I setup ssh tunnel : ssh -D 8090 user@ssh.proxy.net to forward all the packets to my localhost:8090. How can I set up ...
12
votes
5answers
8k views

SSH: Do you use one private/public key pair for each remote machine? Or a single pair for all?

When you want to have public key based ssh logins for multiple machines, do you use one private key, and put the same public key on all of the machines? Or do you have one private/public key pair for ...
10
votes
10answers
15k views

DNS Name lookup (was SSH) Not Working After Snow Leopard Upgrade

I think this started with the Snow Leopard update. Cleaned out the .ssh directory, still having the issue. ~: uname -a Darwin california-example-com.local 10.0.0 Darwin Kernel Version 10.0.0: Fri ...
9
votes
4answers
2k views

SCP filename tab completion

I use SCP regularly to move files between servers and I've heard rumoured that you can use tab-completion on the remote server if you're using public keys, but so far I have had no luck. What I'm ...
8
votes
5answers
32k views

How can I edit the welcome message when ssh start?

I have a vps for my website hosting. It is running a ubuntu server. Every time I logged in my server by ssh, it displays a lengthy welcome message in my terminal. Linux node61.buyvm.net ...
8
votes
3answers
7k views

How can I use the same key for SSH and SSL (https)

I'm trying to install the development tools for a small team, and I can't get the authentication right. Since we are a distributed team, the server is on the internet. And I'd like to have SSO+zero ...
12
votes
5answers
6k views

Windows SSH Tunnel Manager

What application do you use on windows to create SSH tunnels On Linux I use gSTM, and on OSX I have used STM, but I am not able to find any similar free tools on windows. I don't want to use putty, ...
10
votes
3answers
4k views

Set up sftp to use password but ssh not to use password

Is it possible to set up a user on ubuntu with openssh so that ssh does not use password authentication but sftp does? I assume that if I change /etc/ssh/ssh_config to have PasswordAuthentication yes ...
8
votes
2answers
8k views

How do I set default permissions for SFTP for an Ubuntu Server?

We have an Ubuntu 10.04 server. How can I set it so that new files created (or copied) over SFTP or SSH have g+rw and g+rwx permissions (where appropriate)? I'm also using setgid (chmod g+s) so that ...
8
votes
4answers
4k views

When would ssh -t not be appropriate instead of ssh?

Using ssh -t instead of ssh for connections to remote servers has several advantages. For example, I can directly edit a file with vim: ssh -t host vim foo.txt, which would fail otherwise. Are there ...
4
votes
2answers
1k views

Easy multi-level authentication for sudo

I have a FreeBSD server with password-based SSH enabled. I would like to enable sudo, but I do not want a potential attacker to be one password away from root access. My current solution is logging ...
3
votes
11answers
845 views

Ubuntu Server SSH

I have a server with ubuntu. I do work on it over SSH. I had a problem with brute force attempts over port 22. I changed the port and I assumed it fixed the brute force problem. Am I right or are the ...
17
votes
7answers
3k views

Restart SSH on a machine where SSH is the only mode of access

I've made some changes to sshd_config file and therefore need to restart. I'm looking tips on safely restarting ssh when getting physical access to the server would be a huga PITA.
14
votes
4answers
3k views

Is it possible to get OpenSSH to log the public key that was used in authentication?

I have a production system where several different people are allowed to log in to a single account - the account is for the application and not for the person as we don't have personal accounts on ...
12
votes
3answers
999 views

Inline SSH command

Is it possible to do a simple inline style SSH command, for example: ssh foo@bar.com { cd foo/bar && rm *.foobar }
11
votes
14answers
23k views

Stop ssh login from printing motd from the client?

I've got SSH passwordless set up, however it prints the MoTD when it logs in. Is there anyway to stop that happening from the client side? I've tried ssh -q but that doesn't work. I don't want to use ...
8
votes
4answers
5k views

Transfer files via SSH

I want to use file transfer via SSH on some scripts. I've read it's possible to tar over ssh. Where should I start reading?
8
votes
4answers
662 views

Remote Root Login

I know one of the first things you do to secure a server is disallowing remote root login. Passwords are pretty weak; what do people think of only allowing root login via ssh keys or other ...
6
votes
1answer
683 views

Adding port forwardings programmatically on a ControlMaster SSH session

I just found out about the ControlMaster/ControlPath feature of OpenSSH, which allows you to use a single SSH connection to run multiple terminals. As I often use SSH to use port forwarding to get ...
1
vote
2answers
2k views

ssh remote command-fu

I am trying to do a remote backup from behind a firewall. It is really no problem to break this out into its own script that gets called in crontab, but that isn't any fun! What I am trying to do ...
12
votes
10answers
5k views

Best way to go about changing a root password on 3000+ Solaris, AIX, and Linux servers?

Long story short: Big old corporation, lots of UNIX/Linux servers. I inherited responsibility for a bunch of scripts that that left a few years ago. One of them was a script that would be run every ...
10
votes
3answers
26k views

how do you create an ssh key for another user?

I'm trying to create an ssh key for another user. I'm logged in as root. Can I just edit the files generated by ssh-keygen and change root to the user I want?
8
votes
4answers
6k views

How can I automatically change terminal colors when I ssh a server?

I'm frequently logging into different servers from my os x terminal window. I'd like to assign a color scheme for different hosts so that my terminal windows are easier to tell apart. Can this be ...
8
votes
1answer
2k views

SSH passphrase remembered in MacOSX Snow Leopard

I am facing a very strange situation with Snow Leopard. I have a Linux server, configured to accept an ssh connection authenticated only through RSA key. No password. On my laptop I correctly deployed ...
7
votes
2answers
7k views

SFTP fatal bad ownership or modes for chroot directory ubuntu 12.04

I just set up my SFTP server and it works fine when I use it from my first user account. I wanted to add a user which we will call 'magnarp'. At first I did like this in sshd_config: Subsystem sftp ...
7
votes
2answers
4k views

How can I close SSH tunnel gracefully?

I have open tunnel with ssh -2 -N -L 5001:localhost:1019 eonil@test.local The tunnel is working good, but I have to Ctrl+C or Ctrl+D to force quit the tunnel. How can I close the tunnel gracefully? ...
7
votes
4answers
33k views

Free public SSH server for testing purposes [closed]

I'm writing an application that makes connections to SSH servers. It doesn't need anything specific from the server (except running under GNU/Linux). I need SSH servers for running my application ...
7
votes
6answers
9k views

Can't get detached screen to resume

I use putty and have an unreliable wireless connection, so I use screen to keep my work going. Often I'll get disconnected, and then I can't reattach my screen. I'll run screen -D -RR and it will just ...
5
votes
8answers
14k views

Is it possible to prevent SCP while still allowing SSH access?

Using Solaris and Linux servers and OpenSSH, is it possible to prevent users from copying files using "scp" while still allowing shell access with "ssh"? I realize that 'ssh $server "cat file" ' type ...
4
votes
5answers
4k views

How can I disconnect ssh users, or limit the number of ssh logins?

I have an application that is using ssh to authenticate. Due to a variety of regulations (HIPAA, etc) users can only be logged in for a certain amount of time, and they can only be logged in once. I ...
4
votes
3answers
3k 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?
4
votes
3answers
6k views

How can I enable X11 forwarding to a Debian server box?

I want to connect to a server with SSH (a Debian installation in a VMware image). On that server I want to call gitk a repository viewer for git. What do I need to do to make this work?
3
votes
2answers
4k views

How to display SSH banner at login, but only for password authentication

I have a warning message that is displayed to a user after they enter their username to log in to our Linux servers. I only want to display this message for password authentications, and not when ...
17
votes
4answers
17k views

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 ...
9
votes
2answers
9k views

How to check if a RSA public / private key pair matched

I have two files, id_rsa and id_rsa.pub, what command can be used to validate if they are the valid pair.
7
votes
2answers
2k views

Authentication Order with SSH

i am still have troubles mastering sshd - when I login with -v I see that ssh is authenticating the following way debug1: Authentications that can continue: ...
7
votes
9answers
40k views

How can I map a SFTP to a Drive, natively in Windows

Today I saw that Vista and Win7 (which I am using) have the option to map ftp natively, according to this article: http://cybernetnews.com/cybernotes-map-a-ftp-to-a-drive-in-windows/ But I need to ...
6
votes
1answer
2k views

Is it possible to run sshd as a normal user?

I'm aiming to start up a second sshd instance on a non-privileged port (e.g. 2222) with my own configuration file. Obviously, the sshd process can't setuid so logging in as users other than the one ...
6
votes
3answers
9k views

Allow scp/ssh for www-data user

I am on Amazon EC2 using Ubuntu 10.04.2 My web folder is owned by www-data so I want to be able to log into my server as www-data for ssh and scp. Thanks! Adding the line to my /etc/ssh/sshd_config ...
6
votes
3answers
3k views

Running 'sudo' over SSH

I'm writing a script which is to log onto a bunch of remote machines and run a command on them. I've set up keys so the user running the script does not have to type the password of each machine, but ...
5
votes
2answers
5k views

SSH tunnel over multi hops using putty

I have a situation where I want to connect to a Linux machine running VNC (lets call it VNCServer) which is behind two consecutive Linux machines i.e., to ssh into the VNCServer, I have to ssh into ...
5
votes
3answers
1k views

OpenSSH with public keys from database

Is it possible to fetch the public keys from a database instead of the authorized_keys file? I would like to use such a setup to manage ssh access to things like git repositories for multiple users ...
4
votes
2answers
2k views

Remote server hangs, gets stuck. How to debug?

I have an vps running on VmWare ESX with Ubuntu 8.04 LTS. It has been running smoothly for the past 3 months, however recently we've notices two strange bugs. a. The server hangs, today was second ...
4
votes
2answers
10k views

execute su -c over ssh

I am trying to check the BIOS version of a server over SSH, a command that requires root privileges: ssh remote-server su -c dmidecode but this of course fails with the error: standard in must ...
3
votes
6answers
2k views

Same command on multiple servers

I'm just wondering if there is any fellow sysadmin with the need to execute one command on multiple servers. If so, what technique are you using? I have grown tired to ssh-ing to 3-5 servers and ...
2
votes
1answer
965 views

SSH from Windows to Linux with AD certificates

I have a Windows client machine connected to Active Directory and a Linux server also connected to Active Directory (through PAM w/ LDAP), and I want to be able to do password-less SSH from Windows to ...
1
vote
2answers
3k views

How does one determine active SSH and SAMBA connection counts?

I have a server that I use infrequently, so I'd like to cron a job to shutdown daily if no users are logged in via SSH and SAMBA shares. How can I determine how many active SSH connections there are, ...
11
votes
3answers
9k views

What options can be put into a SSH authorized_keys file?

I found this article on options that can be put before a key in the authorized_keys file. I was wondering though, are there more? Options listed in the article are from="domain" ...
10
votes
5answers
18k views

Out of nowhere, ssh_exchange_identification: Connection closed by remote host

I am running Ubuntu 10.10 on a remote box. I ssh to it everyday without issues but today out of the blue, I get the following error: ssh_exchange_identification: Connection closed by remote host If ...
9
votes
8answers
16k views

Why can't I ssh into my new EC2 Instance?

I created a new instance (tiny, 64 bit AMI linux from Amazon) Created a new key pair called "mir". I downloaded mir.pem and put it in my ~/.ssh folder. I even did ssh-add mir.pem. Then I tried to ...