Skip to main content

All Questions

Tagged with
-1 votes
1 answer
58 views

BASH SCRIPT: Echo to file is transfered to remote host [closed]

I am writing a bash script in order to perform some automatic backups to a remote storage server. The batch script will be run with cron jobs however I'm testing it before. See script below: #!/bin/...
Frangu Mădălin's user avatar
0 votes
0 answers
32 views

scp returns No such file or directory in script but executes when run manually [duplicate]

For context, I need to use a custom command to build an identity file so I can ssh successfully. I've renamed it because it's an internal tool and want to avoid NDA issues. You can consider it as a ...
HappyCoder's user avatar
0 votes
1 answer
25 views

Two versions of same script on server/weird behavior

I uploaded a bash script to my vps using scp. Then I changed a line locally, deleted it on the server and uploaded it again to the home directory. Now I'm facing this extremely weird behavior: If I ...
user avatar
1 vote
2 answers
3k views

Why doesn't SCP accept the username/hostname combination, when it's accepted by SSH?

I use ssh to login to Linux hosts through CyberArk, which is the reason for the username/hostname combination: DB6164@DB6164CP#[email protected]#[email protected] The following ...
Shuzheng's user avatar
  • 4,871
0 votes
3 answers
6k views

Variable for SCP command in script

I'm trying to write a script that will check what is the last modified/created file on the server, then copy it to my homedirectory on this server and then copy this file from node to my local machine....
Grimorth's user avatar
3 votes
1 answer
1k views

Using local system's .bash_profile and .vimrc on remote systems

Risking asking a possibly duplicate here but could not get any relevant answers. I wish to use my local system's .bash_profile and .vimrc on all the remote hosts I log in to. Is there an easy way to ...
Dexter's user avatar
  • 161
1 vote
0 answers
1k views

scp attempt in a bash script triggered by cron fails; works when run script manually

Trying to scp a file in a bash script that's scheduled by cron. When cron triggers it, the scp fails with a permission denied error message. When I run the script manually using a command like: /...
dot's user avatar
  • 735
2 votes
1 answer
15k views

How to copy the files from remote unix server to local windows? [duplicate]

I have my working system in a remote location and the os is in unix and i need to get the files from that remote unix system to my local machine using bash commands. I tried scp ls .txt* D:\BACKUP ...
Rak kundra's user avatar
6 votes
1 answer
17k views

specify shell for ssh session

I am logging to a remote server via ssh as user www-data. User www-data on the server has his default shell set to /bin/sh, and when I log in, I get dash as my shell. I can then type bash and get bash ...
Martin Vegter's user avatar
1 vote
1 answer
480 views

Concat all remotely distributed files in your cluster

I want to concatenate all abc_2015-12-15.txt files present on my cluster.Is there any best way to achieve this ? One way is to use below command across all nodes till all files concatenated :- ssh ...
Aashu's user avatar
  • 791
1 vote
2 answers
2k views

bash scripting : using expect

I am facing an issue when I run simply these commands. The remote server want to pass "yes" to add the key in RSA file because first time connection established with scp. commands are given below #!...
Hassan Hashmi's user avatar
3 votes
3 answers
8k views

How to copy, execute and retrieve data from a remote computer?

I am trying to run some calculations on a remote computer. Basically I want to copy some files to the computer, load a software, execute the calculation, then retrieve the data back. I have created a ...
hat's user avatar
  • 215
0 votes
2 answers
989 views

When executing a script via ssh, how can I transfer variables back to the PC issuing the cmd?

I'm writing a pretty simple script that will SSH into the machine of my choice, run a script to obtain things like the number of users logged in, CPU averages, etc, and write it to a file on the PC ...
OpenSrcFTW's user avatar
8 votes
5 answers
129k views

How to copy a file from a remote network to the local desktop

So I used SSH to remotely login to another computer on a network. I have many files that I would like to copy over to my local desktop. I am trying to follow this How-to : However, I think one of ...
XiJiaoping's user avatar
93 votes
11 answers
100k views

Autocomplete server names for SSH and SCP

I have a few servers configured in ~/.ssh/config, such as alpha and beta. How might I configure Bash such that the commands $ ssh alTab and $ scp file.tgz alTab autocomplete the names of the ...
dotancohen's user avatar
  • 16.4k

15 30 50 per page