Linked Questions

40 votes
1 answer
16k 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 ...
9000's user avatar
  • 1,681
23 votes
3 answers
50k 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 [email protected] /etc/init.d/some_service stop scp [email protected]:/var/some_service/events ./events scp ....
Arenim's user avatar
  • 351
0 votes
1 answer
192 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 ...
forthrin's user avatar
  • 2,489
18 votes
4 answers
21k 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" != "" ] ; ...
Anthony Ananich's user avatar
11 votes
3 answers
58k 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 ...
Aufwind's user avatar
  • 245
8 votes
4 answers
42k 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@...
romil gaurav's user avatar
1 vote
2 answers
28k 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 want ...
Arya Ray's user avatar
2 votes
3 answers
19k 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 ...
Evgeni Sergeev's user avatar
3 votes
3 answers
22k 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 works ...
user avatar
6 votes
1 answer
4k 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 ...
nneonneo's user avatar
  • 1,198
7 votes
3 answers
4k 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 ...
thonixx's user avatar
  • 182
3 votes
3 answers
4k 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 ...
Erik Kaplun's user avatar
2 votes
2 answers
9k 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$ ssh-...
fuser's user avatar
  • 717
2 votes
2 answers
3k 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 ...
floatingpurr's user avatar
1 vote
2 answers
4k views

Automatically entering ssh password from Busybox terminal

I currently am attempting to reboot a modem via ssh using a bash script. For reasons I don't feel like explaining, I NEED to start on an ubuntu server computer, ssh into a setup running busybox 1.21.1 ...
wvu_evan12's user avatar

15 30 50 per page