Tag Info

New answers tagged

-1

nohup scp shinto@source:/home/data roose@target.example.com:/var/tmp/file stop temporarily the command with CTRL+z put on background the command, type: bg yo can check the process with: jobs


2

Full credit for this answer goes to http://superuser.com/a/602436/142948 You need the -3 option for scp: scp -3 one:/opt/bigfile.tar.gz two:/opt/bigfile.tar.gz -3: Copies between two remote hosts are transferred through the local host. Without this option the data is copied directly between the two remote hosts. ...


0

The easy way to do things through two layers of SSH is to hide the intermediate layer. Set up a ProxyCommand so that you can directly run ssh computer_name from the original client. Set up public key authentication and activate agent forwarding (ForwardAgent yes in ~/.ssh/config), so that you don't need to provide credentials explicitly to the intermediate ...


1

Set up a port a local port forward. For OpenSSH it would mean: $ ssh login@host -L 2222:computer_name:22 which causes any connectionns to port 2222 on localhost be forwarded to port 22 on computer_name via - and that is important here - host. Then follow $ scp -P 2222 computer_name_user@localhost:remote local Obviously this also allows you to connect ...


1

I would suggest you have your script in your home for remote execution and then call your script as, ssh user@host 'bash -s' < local_script.sh Basically, from your script with passwordless access, after ssh username@host, the script is not getting executed. This could be easily tested. Testing Have these 2 lines in a script and try running the ...


2

I'm not really sure what your question is, but I have two remarks which are too long for a comment: Your current script will stop once you log to host (at line 4) and will wait for you to do something interactively - only when you exit will the script proceed (which probably isn't what you want). Hence put anything that is to be executed on the remote ...


0

Basically you are expecting your script to continue on the remote machine, which it is not going to happen, they will run on your local machine instead. In order to achieve what you want you will need to pass the series of commands to the remote machine through ssh. You can read this guide to get the idea: ...



Top 50 recent answers are included