Linked Questions

21
votes
3answers
39k views

Copy over ssh and execute commands in one session [duplicate]

Possible Duplicate: Using an already established SSH channel Here is my sync script: ssh user@remote.host /etc/init.d/some_service stop scp user@remote.host:/var/some_service/events ./events scp ...
27
votes
1answer
9k views

Reusing ssh session for repeated rsync commands [duplicate]

Possible Duplicate: Using an already established SSH channel I have a remote server accessible via a chain of SSH proxies. The resulting channel is wide and fast enough, but setting it up takes a ...
0
votes
1answer
155 views

Access remote services as if local using single SSH connection [duplicate]

Is it possible to create a single SSH tunnel to address a remote host like it was sitting on the local system, eg. type the following pseudo-examples locally and achieve the desired effect: Copy ...
16
votes
4answers
16k views

Bash: interactive remote prompt

I have a script which connects to a remote server and check if some package is installed: ssh root@server 'bash -s' < myscript.sh myscript.sh: OUT=`rpm -qa | grep ntpdate` if [ "$OUT" != "" ] ; ...
11
votes
3answers
49k views

How to write a bash script, that logs onto an other machine to do stuff?

Is it possible to write a bash script, that would be started from machine A, logs in on a different machine B by ssh (both machines A and B would be Linux-Machines), copys some files on to machine B ...
4
votes
3answers
17k views

Opening files from Ubuntu server over ssh from Mac Terminal

So I SSH into a Ubuntu server and try to open the file in a Mac program (Coda) and get an error: Couldn't get a file descriptor referring to the console Using the command open myfile.html This ...
8
votes
4answers
20k views

scp files from multiple directories on local to multiple directories on remote in one command

I need to copy some files from multiple local directories to multiple remote directories. The command: scp -v /file/source1/* username@host_server:/file/destination1 scp -v /file/source2/* username@...
1
vote
2answers
13k views

using scp renaming all files

I am sending files from one server to another using scp . I need to rename files after sending that .So I use following command for each file scp original-hc.db user@host:/dir/original-hc_1.db I ...
1
vote
3answers
14k views

gvim on RHEL (Red Hat Enterprise Linux) install in home directory

How to install gvim on a RHEL server that doesn't have it (for use with SSH with X11 forwarding*)? No sudo access is available, so it has to be in the user's home directory. *Getting all the ...
3
votes
1answer
3k views

rsync'ing multiple {src,dest} pairs

I have a remote server on which I am deploying code. I am currently using scp to upload code, but scp is very slow and I'd like to switch to rsync (or something else which is more efficient). The ...
6
votes
2answers
3k views

Execute bash commands over SSH while staying in interactive mode afterwards

Probably it is a weird thing I would like to achieve but: I would like to SSH to a remote host and then execute some bash commands like "alias" automatically to use them afterwards in an interactive ...
3
votes
3answers
3k views

Copying a file using SSH over a tunnel with cert forwarding

I need to find a way to copy files from mymachine to a server priv-server sitting on a private NATted network via a server pub-server with a public IP. The behind-NAT machine priv-server only has ...
2
votes
2answers
7k views

Scp command over ssh without password in script

Here is my problem: I would like to perform scp command after ssh to remote server without typing any passwords. I describe my steps. My first steps were: ssh-keygen -t rsa and local@host$ ...
2
votes
2answers
2k views

Execute multiple ssh commands with different switch

I have a bash script for copying two files from a remote machine (that I cannot control), stored in a a path that needs root access. Here it is: ssh administrator@host "mkdir ${DIR}" ssh -t ...
1
vote
2answers
2k views

PHP exec expect script with SCP then SSH

I have a PHP page which runs the following expect script to upload a file to another server on my network: #!/usr/bin/expect -f set password [lindex $argv 0] spawn /usr/bin/scp /home/Dave/bin/test ...

15 30 50 per page