how to fetch data from a unix server to another server in unix? [closed] - perl

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
There are two unix servers called HYD13 and HYD25.
I am having a script(in my home dir) in HYD13 which fetches the required data from that server(HYD13) only and all the required data are printed in a text file.
But my requirement is I need to configure the same script in HYD25(in a path) and It will fetch the data from HYD13 server and prints the data in HYD25 server(mentioned path). But the issue is how to connect HYD13 sever from HYD25 inside the script ?
Could you please help me on this ?

You'd usually use something like scp or rsync, depending on how much data you have to move. scp can move files and directories, while rsync is good when you need to sync and update directories.
Both talk over ssh, so to avoid having to type in your password over and over again (or worse, hard code it into the script) be sure to use ssh keys and an ssh-agent. This lets you log into servers without needing to type in your password, instead the stored keys are used, and all that is tied to logging into your account. Github has a good tutorial on creating keys and adding them to an ssh-agent. Ubuntu also has a good tutorial which covers ssh in more detail and how to put the key on the remote machine.
Finally, rather than having to put your private keys on HYD13 and HYD25, you can leave those keys on one machine and use ssh key fowarding to use those credentials when you log into HYD13 or HYD25. Again, Github has a nice tutorial on how to do this.

I hope HYD13 and HYD25 can communicate with each other over internet or LAN or by any other means. If so,
You can execute the script from HYD25 over ssh
ssh username#HYD13 '< bash path-to-script-on-HYD13 >'
This will print the output of that script on HYD25's terminal which you can re-direct to any text file.
If the script by itself writes data to a local file on HYD13, you could simply cat it so that the contents of the file gets printed on HYD25's terminal
ssh username#HYD13 '< bash path-to-script-on-HYD13 >; cat <script's output file>'
Hope this is what you wanted.

Related

An attempt to brute-force account passwords over SSH/FTP by a machine in your domain or in your network has been detected [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed yesterday.
Improve this question
Unfortunately, I don't know what program is running on my CentOS 7 that is attacking brute-force through SSH.
What commands should I use to find the program or the ssh command executor?
An attempt to brute-force account passwords over SSH/FTP by a machine in your domain or in your network has been detected. Attached are the host who attacks and time / date of activity. Please take the necessary action(s) to stop this activity immediately. If you have any questions please reply to this email.
I used tcpdump and I expected the executor to also log the command, which it didn't do

PDF to DOC using cmd [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
How do I convert a pdf file to doc?
I tried the following:
soffice.exe --convert-to doc C:\Users\Administrator\Desktop\pdfda.pdf
When I hit enter nothing happens, I have libreoffice installed and I'm using Windows 10.
For others landing here the support advice is use soffice NOT soffice.exe since that should on Windows invoke the console command line version soffice.com
see https://ask.libreoffice.org/t/convert-docx-to-pdf-via-the-commandline-on-windows-10/64418/6
Starting from v.6.3, you should not use soffice.exe when working in terminal. You better just omit the extension (like [invoke in folder >] soffice), or explicitly use soffice.com, to use a version specifically created for console, which would output the errors, if any, to the console, instead of silently discarding any output. Also note that you should make sure that LibreOffice is not running in the background when you are launching the command line, because otherwise your command would be redirected to the existing GUI process, and you may again not see the error messages.
Alternatively, specify a separate user profile when calling command line to allow separate processes - see -env command line parameter
Full documentation is at https://documentation.libreoffice.org/en/english-documentation/

generating world in server minecraft (cant join) [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 months ago.
Improve this question
When i launching my minecraft server everything is going well at the start but when world is generating... well it is not generating completely. It says around 80-90% and thats it, server is launched but because world is not generated completely i cant join (my friends cant too). I've tried downgrading java, creating the new world, switching port or even the IP. error while joining to server ; console look
Do you have legitimate Mojang Account? If not, the server will not let you join. I have a cracked version of Minecraft (Tlauncher) and it will not let me join most servers. If you have a cracked account, go in the server properties. There should be an option for "cracked" or "online mode." Once you get there, turn on "cracked" or turn off "online mode." Note: Online mode is just a way to authenticate accounts. It does not affect whether or not your server can run online. If you have a legitimate PAID Mojang account, then try checking the IP address on your computer and make sure you type in the IPv4 address (on Windows, you can find this by typing ipconfig into CMD).

Issue with check postgres nagios perl script [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
How do I make check_postgres.pl file make use of PGPASSFILE or PGPASSWORD parameters to connect to the database?
I tried setting up the environment variables in my Linux environment, but no success.
Also, is there a way to pass an encrypted password (like a md5hash) to the --dbpass variable and connect to the database?
If https://github.com/bucardo/check_postgres/blob/master/check_postgres.pl is the check_postgres.pl you are referring to, it does check the PGPASSWORD environment variable.
The question is then how to make sure that such variable exists on the environment check_postgres.pl is executed.
The nagios docs say to put whatever you need in /etc/sysconfig/nagios.
I suspect it depends a lot on how you installed nagios and/or if you installed it with some OS vendor package manager that does things differently, though.
At any rate, the docs: https://support.nagios.com/kb/article.php?id=489

What happens if I delete the main profile in Ubuntu? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I know that deleting the main profile is a stupid action and it is mainly my fault. I still want to understand the consequences and issues based on my mistakes.
I did today some really silly stuff I used in my Ubuntu Terminal command sudo rm -rf taras, which deleted all the stuff that I had on my Ubuntu taras profile. I was trying to delete other account but ... forgot to modify something.
Luckily I started deploying Ubuntu 2 months ago. I am using it as a secondary OS with Windows (double booting) so none of my personal files where destroyed but my projects, savings were deleted.
Can you please explain to me what are the consequences of this? Do I need to reinstall Ubuntu again? Or I still can continue my work there? In such situations Git really helps a lot ;-)
There isn't anything fundamental in the home directory. You would still be able to boot, though possibly you would end up in a tty login prompt. Alternatively, if it boots into a login manager, logging in might produce some errors. You would still be able to login with your usual credentials.