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)

1
vote
2answers
1k views

ssh-agent loading on login

Everytime I login into our CentOS 5, MediaTemple (dv) server, I have to do: ssh-agent $BASH ssh-add .ssh/my_id once I've managed to login. This is used for our server to participate in our git ...
12
votes
8answers
25k views

using su inside of a shell script

I'm automating a deploy process and I want to be able to just call one .sh file on my machine, have it do my build and upload the .zip to the server and then do a bunch of stuff on the server. One of ...
1
vote
2answers
111 views

sshing into remote as someone else

I can ssh into remote_box and when I am in remote_box my userid is dorelal and I am at /home/dorelal. I have only one entry in my .ssh/authorized_keys and that is my id_rsa.pub . There is an account ...
8
votes
4answers
4k views

OpenSSH : Key-based authorization, maximum key length

I'am using Putty on windows with key-based authentication to access some of mine servers. It works totally fine with ~3700-bit key, but with ~17000-bit key it thinks for like 20 seconds on client-...
0
votes
3answers
1k views

how to ssh from one pc to another on LAN

I have two pcs on a LAN. I can connect from one to the other using ssh, but not the other way. I get ssh -vv 192.168.1.2 OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007 debug1: Reading ...
0
votes
4answers
2k views

execute bash on local machine to do work on remote?

I am thinking about writing an automated script that connects to a server (ssh), copies files from it. execute a script on the server and disconnect. Is it possible to have a script execute code (...
1
vote
1answer
574 views

how would one limit ssh tunnel access?

I have a SSH service on a VPS (linux if it makes any difference) and i recently bought and one of the uses for it is to make a secure SOCKS proxy tunnel. My issue is it allows all traffic on any port ...
3
votes
3answers
5k views

bash script with permanent ssh connection

I use a bash script which runs /usr/bin/ssh -f -N -T -L8888:127.0.0.1:3306 serveradmin@34.324.234.23 However, when I run the bash script, it waits.. I see the connection coming up but the script ...
2
votes
2answers
2k 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 ...
2
votes
4answers
357 views

Mercurial - Set a Repository Root?

I am setting up a Mercurial repository layout, and have a directory with all the repositories in it. /var/vcroot/link/[repository] As SSH is the only way I know of to access Mercurial remotely, I ...
1
vote
3answers
2k views

How to configure OpenSSH to ask for user name instead of using current local login?

When I use ssh command to log in to a remote shell, my local user name is used and only password (or a certificate passphrase) is requested. How do I login as a different remote user without adding ...
1
vote
1answer
506 views

SSH with public/private key to iMac fails

I'm trying to connect to my iMac (server) from my macbook (client) on my LAN. Both have Mac OS X 10.6.4. Server running on a new clean install of the OS. When just activating Remote Login in System ...
0
votes
2answers
248 views

Is there a way to block screen's multi display mode (-x) completely?

I'd like to configure screen to only allow attaching to detached sessions and not to attached sessions, even if they're from the same user. Is there a way to accomplish this? I couldn't find anything ...
3
votes
3answers
16k views

Can't login to Cygwin sshd server with a non-administrator user account

I'm having some difficulties logging in to my Windows 2008 server (a DC) running Cygwin sshd. I can log in fine with an account that is a member of the Domain Admins group, but when I try with a ...
11
votes
2answers
16k views

What a pros and cons of FTP vs SSH for file transfers?

Why to consider setting up an FTP service on a server when files transfers work fine by means of SSH (with Midnight Commander on a Lunux and FileZilla on a Windows client)? What are pros and cons of ...
8
votes
5answers
430 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
3answers
353 views

Banned myself from my own server, or something with my DNS?

I can't seem to ssh or even browse my site ( medero.org ) even though it's resolving to my server's ip, but other people can. I was SFTPing some files earlier, but nothing out of the ordinary. How ...
0
votes
2answers
408 views

automatic ssh logout not working due to screen caption setting

I have set up an automatic logout for idle ssh session using "ClientAliveInterval 7200" However I do not get logged out everyone else who uses the server gets logged fine. I have tracked the ...
0
votes
1answer
191 views

Hung sshd connections

Our linux server has something like 50 "zombie" ssh connections... I cannot restart the machine right now and I would really rather not have to kill each one by PID. I'm also not sure if killall will ...
2
votes
2answers
2k views

Terminal Width issues with Linux Screen

I'm having issues where when I'm in a regular SSH terminal, with $TERM set to xterm-256color, and the terminal width is very small (narrow) in Linux Screen. I'm running Arch Linux. When I'm in the ...
24
votes
4answers
7k views

How do I sudo over sshfs?

On my local host alpha I have a directory foo that is mapped via sshfs to host bravo as follows: $ sshfs charlie@bravo:/home/charlie ~/foo However, on host bravo there is another user, delta, that ...
3
votes
5answers
663 views

Using 'passwd' then trying ssh

An exceptionally newbie question, sorry. I'm running a Debian machine as root: $whoami root If I carefully change the password (over VNC), it seems to work: debian:/# passwd Enter new UNIX ...
4
votes
6answers
11k views

sshd shuts down with “No supported key exchange algorithms” error

sshd $ /usr/sbin/sshd -f testconfig -p 22025 -d debug1: sshd version OpenSSH_5.2p1 debug1: private host key: #0 type 0 RSA1 debug1: read PEM private key done: type RSA debug1: private host key: #1 ...
0
votes
1answer
848 views

How to enable dynamic client in hosts.allowed for SSH?

I'm using a hosts.allowed for SSH. Now, some people have dynamic IPs but they also have dyndns.com hosts. How could I use a dyndns.com like host to /etc/hosts ? (The server is a Debian 5.0 Lenny ...
10
votes
3answers
3k views

Can I execute some commands when starting ssh session before getting to interactive mode?

When starting ssh session with ssh command I seem to have two options - default interactive session with default env and starting from home directory - or to execute arbitrary command but non-...
2
votes
4answers
1k views

GIT pull times out?

I've recently set up a small turnkeylinux revision control VM (which has about 256MB RAM), and am attempting to clone one of the repositories I pushed up to it. It is very fast to push to (via ssh) ...
0
votes
2answers
109 views

Make all accounts use the same kind of Bash

On a dedicated server we use the shell is setup differently between accounts, which is quite irritating. When I ssh into most users I get: [user@machine some_dir]$ However, with some accounts I get:...
-2
votes
1answer
2k views

PuTTY - Server Unexpectedly Closed Network Connection

I have two servers that I have been able to connect fine as s1.website.com and s2.website.com I connected to s1.website.com earlier today without any issues, however, when I connected to s2.website....
0
votes
3answers
1k views

using perl how can i automte login to remote linux host using ssh

currently, i have statements like : system("ssh -o StrictHostKeyChecking=no root\@${address} \"cat /var/log/messages""); This did not require a password, since the two systems were setup with proper ...
3
votes
4answers
253 views

Filtering SSHD Logs

I'm just wondering about the best way to filter my sshd logs. The problem is that I monitor my boxes over SSH using Nagios and Cacti. They both connect every 5 mins and this clogs up my log files with ...
1
vote
2answers
514 views

No SSH access after reboot

I am having an issue where I can access a server remotely via SSH but if I send the reboot command. Once the server reboots I get a timeout when I try to relogin. The only way to fix the problem is to ...
1
vote
2answers
972 views

Running two SSH servers

Is this above mentioned in title possible ? I want to run one SSH server for SFTP clients (on some other port.. for ex 2121 ), and want to run other SSH server for SSH clients which will be allowed to ...
4
votes
2answers
3k views

What is the proper way of scp'ing between two servers you log in by private key?

I have a large amount of data to send from one server to another. I access servers via ssh using a private key. The problem is that I cannot use that key to scp files from one such server to another -...
1
vote
2answers
3k views

Ubuntu 10.04 keep disconnecting idle ssh connections after few minutes?

I just installed a new Ubuntu Server 10.04 and I observed that if I do not use my connection for a while it will just disconnect me. This never happened to me on CentOS or even on older Ubuntu. /...
0
votes
1answer
343 views

Can't remove tunnel created by Cygwin

I need to make a tunnel from Linux to my Windows 7 machine. I have been able to get it to work with Cygwin, but it's not possible to remove the tunnel later. To create the tunnel, I type: ssh -f -N ...
1
vote
1answer
384 views

connecting to an EC2 instance via ssh on a created user

I can connect to my EC2 instance as root but if I create a user I get a Permission denied(public key) error. Here is the output from ssh -v OpenSSH_5.3p1 Debian-3ubuntu3, OpenSSL 0.9.8k 25 Mar 2009 ...
1
vote
2answers
1k views

Keeps “SSH timeout” error in our AWS instance- how do i diagnose?

I am befuddled by this error. We keep failing to SSH into our AWS instance, whether it is is deployment or via console. I have tried rebooting a few times, but it does not seem to be helping. Here ...
3
votes
5answers
3k views

Alternatives to SSH for tunnelling connections

I'm currently using COPSSH to tunnel various connections to a remote Windows box and connecting using plink.exe from the PUTTY suite. After connecting directly, I've come to realise that the quality ...
0
votes
1answer
515 views

Having a Windows scheduled task to emulate cron

I'm trying to rig up a really ghetto cron job. I'm hosting a site on shared hosting (can't afford dedicated), and I need to use cron for some stuff on it. The problem is obviously cron stuff is not ...
0
votes
1answer
1k views

SSH key stopped working, still works on other servers

I've got about a dozen servers that I log into via an authorised ssh key, and up until today it was working fine. Today, one of those servers refuses to accept my key - it accepts a root key and my ...
1
vote
2answers
240 views

Is there a way to force sshd to call fsync() at the end of an scp upload?

I've got a Debian Linux-based server that accepts file uploads via scp, and this server tends to get powered off suddenly from time to time. If the power loss occurs shortly after an scp upload has ...
2
votes
2answers
303 views

ssh hangs when connecting to IP address, OK when using hostname

Using Mac OSX 10.6.4. I'm trying to ssh into the same computer I'm using. My computer's name is simply MacBookPro. The short version is that when I ssh to my machine using its IP address , it ...
4
votes
1answer
779 views

ssh known_hosts entry from hostname and host key

How can I create an entry in a ssh known_hosts file from hostname and host key? I want to do it without trying to connect to the remote system, automaticaly loading the key over untrusted network and ...
1
vote
2answers
1k views

How to limit the number of SSH connection from the SSH Sever

Is it possible to limit the number of concurrent SSH connections to server ? Warm Regards Supratik
3
votes
2answers
859 views

Bash Script for SCP — SSH Keys

I'm working as a programmer at the moment, and as a result need to constantly upload my software to remote systems for testing. I have about 7 machines which need to receive copies of everything. At ...
1
vote
1answer
165 views

closing ssh ControlPath

I found the instructions on kerneltrap's mail archive: "scp batch mode?" to be insightful an useful, however when I issue the command to close the connection # Bring the connection down. ssh -S /tmp/...
1
vote
3answers
7k views

SSH Tunnel yielding “administratively prohibited: open failed” after a few hours

i have a dynamic OpenSSH tunel running as : ssh -N -D *:1080 user@example.com (OpenSSH_5.3p1 Debian-3, OpenSSL 0.9.8n 24 Mar 2010) which runs perfectly for a few hours, of few days, but begin to ...
1
vote
1answer
1k views

What's the connection between an AWS EC2 AMI's private key and the ~/.ssh/authorized_keys?

I have an EC2 instance running with a keypair that I don't have access to the private key of. I am currently accessing the instance freely thanks to having the public key of my own custom keypair ...
2
votes
5answers
1k views

Many concurrent SSH commands in a bash script?

My Bash-Foo is not strong. Right now I have something like function update_project { for i in server-{1,2,3,4} ; do echo "Updating $i" ssh $i "git pull" done } The number of servers is ...
0
votes
4answers
3k 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 ...