SSH (Secure SHell) is a protocol for running commands on a remote computer.

learn more… | top users | synonyms

1
vote
1answer
1k views

Where to find file transfer history from a SSH client (Debian/Linux)?

Help!! Have you ever tried dragging a folder to another folder by mistake in a graphical SSH client? Well, I did this morning, and since I wanted it to stop immediately (I could see it was about to ...
3
votes
2answers
408 views

File permissions when transferring to another server

If I was to chmod 777 blah.sh on server A and then move it to server B, would it retain the permissions, or would it default to some other permissions once it hit server B?
3
votes
2answers
2k views

SSH slow at starting session

Starting an Interactive shell over SSH is slow to one of my servers. Everything leading up to it including negotiating encryption is fast, but then it hangs for 45 seconds. After that, it finishes ...
1
vote
3answers
1k views

How do i execute a remote script with 'screens'?

I need to execute a script locally. The problem is, it needs to use screen and send the ctrl d command. How would i do this? The script will be on my local windows machine. i can use winscp, putty, ...
0
votes
2answers
183 views

'redirect' ssh path?

Instead of using... ssh://user@mysite.net:1234/mnt/thing/usr/prj I want to use ssh://user@mysite.net:1234/prj How would I do this? It would be good if users can't access /home, /var and such. I ...
3
votes
1answer
5k views

Unable to git clone over ssh

I created a bare git repository and pushed to as root. Then I ran su myuser and ran the following commands: $ whoami myuser $ mkdir t $ cd t $ git clone ssh://myuser@mybox.net:1234/git3 Cloning into ...
1
vote
2answers
247 views

tar through ssh session [duplicate]

Possible Duplicate: What does “-” mean as an argument to a command? When I use this command: tar cf - /tmp | ssh test.com tar xf - What does the '-' mean? And is this the ...
7
votes
3answers
10k views

ssh remote server on some port other than 22 without password

I am usually connecting to the remote server with ssh user@server.com -p 11000 and then giving the password each time for user. How should I avoid entering the password each time I connect ...
19
votes
4answers
39k views

Open a window on a remote X display (why “Cannot open display”)?

Once upon a time, DISPLAY=:0.0 totem /path/to/movie.avi after ssh 'ing into my desktop from my laptop would cause totem to play movie.avi on my desktop. Now it gives the error: No protocol ...
7
votes
6answers
12k views

How to run commands in batch mode over ssh?

How can I run commands in batch mode over ssh? That is, what is the ssh command's equivalent of sftp -b <filename> <hostname>? I have a set of commands which I wish to run across a set of ...
5
votes
2answers
19k views

Why do I get an “rsync: failed to set times on … : Operation not permitted (1)” error on Ubuntu 10.10 with SME Server 7.4? [duplicate]

I am trying to cron an rsync via ssh between two fileservers that are running SME Server 7.4 and Ubuntu 10.10, respectively. The first rsync worked just fine (for reasons that I do not know), but now, ...
0
votes
2answers
607 views

SSH Copy Limit?

So I have a small little Ubuntu server set up, with some rather large files that I've allowed a few people to copy from their putty window. Anyways 2 questions: Lets say a person on windows wants to ...
1
vote
2answers
188 views

ssh fails for an unix server due to dual layer of authentication

I have a server which has dual authentication layer. Meaning first a user has to login to the box using his userid and then use a group id to access the development folder (say). Now I have a script ...
1
vote
2answers
682 views

OpenWrt ssh host identification with dyndns

If i ssh to my remote OpenWrt router ["via DynDNS"] I get the message @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ Ok, i delete the old line in ~/.ssh/known_hosts, add the new one ...
17
votes
6answers
18k views

How can I run a script immediately after connecting via SSH?

I started to ask this question but answered it while I had it open. I'm going to post this question, follow it up with my solution and leave it open to other potential solutions. <backstory> ...
9
votes
7answers
10k views

How do I work with GUI tools over a remote server?

I have an Ubuntu server running on EC2 (which I didn't install myself, just picked up an AMI). So far I'm using putty to work with it, but I am wondering how to work on it with GUI tools (I'm not ...
22
votes
3answers
18k views

Restricting an SSH/SCP/SFTP user to a directory

Is there a simple way to restrict an SCP/SFTP user to a directory? All methods that I've come across require me to set a chroot jail up by copying binaries, but I don't think that should be necessary. ...
2
votes
2answers
1k views

How can I keep processes running on a remote server even after turning off the terminal machine?

..and then still be able to return to the same session/screen after restarting the terminal machine. I've tried screen but once I restarted my computer screen -d showed no sessions. Nohup seems to be ...
18
votes
4answers
6k views

How can I detect if the shell is controlled from SSH?

I want to detect from a shell script (more specifically .zshrc) if it is controlled through SSH. I tried the HOST variable but it's always the name of the computer which is running the shell. Can I ...
3
votes
1answer
3k views

Can a user with /sbin/nologin shell login through ssh?

Is it possible to ssh to a machine as a user with no valid shell (say, mail)? So far I cannot, and using the command below doesn't work: $ ssh mail@machine.local /bin/bash It will always say "This ...
5
votes
1answer
779 views

Detecting SSH agent forwarding

How can I find out whether an SSH connection has been established with or without agent forwarding? I'm trying to do the following: ssh-add -D (delete all stored keys) ssh --vvv something ssh-add ...
2
votes
1answer
4k views

How to install java on CentOS VPS through ssh

I wrote a little Java servlet and, in order to run it, acquired a VPS which runs Centos 5. Now, in order to run it, I guess the first thing to do is to install the latest JRE. I have ssh access and ...
4
votes
3answers
3k views

How to find the machine from which a user logged into current machine using ssh?

In a multi server architecture, is it possible to find out from which machine a user logged into current machine using ssh? For example, user1 logged into host1. From there, the user logged into ...
9
votes
1answer
13k views

How to wget a file to a remote machine over SSH?

I'd like to basically pipe a wget command to a file on a remote server over SSH. How can I do this? I know I could simply ssh into the server and have it download the file, but I'd much rather use the ...
6
votes
2answers
5k views

Not able to ssh in to remote machine using shell script in Crontab

Below is the script which i am trying to run, which runs without any issue for i in `seq 200 2100` do usr=(`ssh -t -t -o ConnectTimeout=60 machine$1 finger | tail -1 | awk '{print$1}'`) echo ...
3
votes
2answers
340 views

Recommended way to login to root?

After I found out hundreds of hacking attempts are made in a day I decided I want to disable logging in to root remotely via a password. But then I found I can't switch users in WinSCP so I can't ...
5
votes
2answers
5k views

How do I disable remote root login via ssh?

How do I disable remote root login via ssh? I want to log into my server (I use keys on my main comp) then su into root instead of access root directly. I am using Debian. I follow guides online ...
0
votes
2answers
759 views

Git Server Bash and SSH

I want to use Git over SSH with my Linode VPS running Ubuntu 10.04 LTS. Instructions seem pretty easy, infact given I had already setup my SSH key etc.. All I had to do was instruct my local ...
13
votes
4answers
844 views

What is SSH - the protocol and what is ssh - the utility?

What is SSH - the protocol? What is ssh - the unix utility and how does it work? How is SSH protocol related to SFTP? What is sshd? Does the command su use ssh or sshd?
15
votes
4answers
6k views

What's the difference between SFTP, SCP and FISH protocols?

I used to think SCP is a tool to copy files over SSH, and copying files over SSH is called SFTP, which is itself a synonym to FISH. But now as I was looking for a Total Commander plugin to do this in ...
2
votes
1answer
133 views

how to use secured port using ssh

We have a process that is using a working secured port using this scp command like so: /usr/bin/scp -P 1234 -i /path/key_rsa /home/path/filename.txt user@remotehost:/tmp I'm working on a schell ...
3
votes
4answers
6k views

programmatically creating a remote directory using ssh

Using a shell script, how can I create a directory remotely from serverA -> serverB using ssh? Can I pass the create directory command with the ssh command? How? I'm basically looking to create a ...
1
vote
2answers
805 views

ssh-agent error on ubuntu server 10.04 LTS

I have an Ubuntu Server 10.04 installation on Linode. I am trying to use ssh-agent to stop typing my passphrase everytime I need to push some changes to GitHub. I am using the script provided by ...
2
votes
2answers
646 views

rsync via ssh from linux to windows sbs 2003 protocol mismatch

I am trying to backup my linux webserver to our local windows sbs 2003 server in the office. I have set up ssh and cwrsync on the windows server and have confirmed that the linux server can reach the ...
5
votes
2answers
753 views

How can I forward traffic from my publicly available server to a computer that is not publicly available?

My home computer is behind an ISP-level NAT which does not allow me to host game servers as a result. I have a VPS which I use as a web server. I want to host a game server of Minecraft, but the VPS ...
3
votes
1answer
12k views

How to enable remote login?

Currently I can only login to my remote linux via the "ubuntu" user account, without a password (via SSH authentication). I have another user configured on the machine, and if I try to login with its ...
3
votes
2answers
1k views

set umask to 0002 for sftp and scp

I want files sent to my server using sftp and scp to be group-writable. How can I do that? I tried using libpam-umask from http://wiki.debian.org/DebianDesktopHowTo but it didn't work. EDIT: Is ...
9
votes
2answers
2k views

Ssh login hook?

Is there a way to run a script/command every time a user connects using ssh? Can it be configured globally (i.e run the script when any user login)? I came across this question on Identica, but there ...
10
votes
3answers
3k views

How can I make a user able to log in with ssh keys but not with a password?

I would like to create a user and have no password. As in you cant log in with a password. I want to add keys to its authorized_keys by using root. This is for my automated backup system.
2
votes
3answers
7k views

Launch a GNOME session from terminal

I'm sshing into my friends machine and I'm wondering how would i launch a GNOME session over SSH? I need to open a web browser on his machine to view something which can only be done from his ...
4
votes
1answer
149 views

I can't ssh on localhost at a certain port on os x

Here are basics information: $ which ssh /opt/local/bin/ssh It's like that because I'm using MacPorts and it did install there. I did the sudo port load openssh When doing a netstat -an | grep ...
2
votes
4answers
563 views

ssh public keys instead of SASL for authenticated SMTP sending?

I'm currently using postfix and SASL on my personal server for authenticated SMTP. The server is purely for my personal use and my personal domains, so I'd much rather have something simpler based on ...
17
votes
5answers
30k views

Uploading directories with sftp?

I'm having some trouble uploading directories(which contain other directories a few levels deep) by sftp. I realize I could work around this by gzipping, but I don't see why that's necessary. Anyway, ...
1
vote
2answers
342 views

How to specify where files are transferred to using ssh

I know how I can send files to a specific directory on a remote server using ssh, but I don't know how to specify it.
5
votes
3answers
206 views

I'm moving up from managed hosting to a VPS. What do I need to know?

I'll be starting to use a VPS for my web hosting this week, which is a big step-up for me since I've only used managed/shared services before. I've a bit of experience with Linux and I'm not afraid of ...
3
votes
1answer
408 views

Why is GNU screen / byobu leaving garbage text in the shell during a reverse search?

I recently starting using GNU screen via Byobu but I think the problem is related to screen. I first SSH into a server and then do a reverse search to run a commonly run command (dump a the ...
12
votes
1answer
2k views

Is there an easy way to update information in known_hosts when you know that a hosts key has changed?

If a host's operating system has been re-installed and had its public key regenerated sshing to it will of course fail because the new key doesn't match the old one. Is there an easier way to tell ...
7
votes
1answer
164 views

Managing and applying custom updates to multiple identical machines [duplicate]

I work at a library where we have just recently setup 5 kiosk's based on linuxmint. The hardware is identical. I actually used DD to make an image after I set the first one up. My Problem is, I now ...
7
votes
1answer
2k views

Nested ssh session inside screen has no color

I am attempting to keep a nested ssh session inside of a byobu/screen window, which I also connect to over SSH with Putty on Windows. However the nested SSH session has no color. Here's what I'm ...
2
votes
2answers
829 views

Puzzle: transfering files between two servers (ssh, ftp, http multipart…)

A puzzle: files being uploaded in realtime by SCP to SERVER1 need to be transfered to SERVER2. But: SERVER1 doesn't actually have network access to SERVER2 (NAT), however SERVER2 has SSH access to ...