General :: Use A File In Remote Server?

Apr 2, 2011

I have a file ( /tmp/my_file.txt) in local server , I have a script as below , it works fine.

for file in /tmp/my_file.txt ; do

done

Now , if the file ( /tmp/my_file.txt ) is in remote server , can advise what can i do ?

View 3 Replies


ADVERTISEMENT

General :: Parse File From Remote Server To Caculate Count Of String Existence In That File?

Aug 30, 2010

I need to parse the file of same name which exist on different servers and calculate the count of string existed in both files.Say a file abc.log exist on 2 servers.I want to search for string "test" on both files and calculate the total count of search string's existence.For example if file abc.log on server 1 has string "test" 2 times
and file abc.log on server 2 has string "test" 4 times.then the output will beStringName : Countexampletest : 6 timesNote : I have created the password less connectivity using ssh-keygen.

View 2 Replies View Related

General :: Reading A File From A Remote Server?

Oct 15, 2010

I have an situation where I want to read a file into my script that lie on a remote server. I have ssh-keys set up just don't know how to do this.

View 7 Replies View Related

General :: Grep Contents Of File On Remote Server?

Sep 24, 2010

I am attempting to grep the contents of a key file I have SCP'd to a remote server. I am able to cat it:

Code:
[bluethundr@LBSD2:~]$:ssh root@sum1 cat /root/id_rsa.pub
root@lcent01.summitnjhome.com's password:

[code]...

View 5 Replies View Related

General :: Delete A File On A Remote Server Using Shell Scripting?

Jul 18, 2010

delete a file on a remote server using shell scripting.

View 14 Replies View Related

Server :: Remote MySQL Server Connection Dies After Wget Large File

Feb 3, 2011

We have 2 servers, 1 is the webserver and the other is the Mysql server.

When transfering a 2GB file from the webserver to the Mysql server.

The webserver's connection to the mysql DB server dies completely.

Need to restart the MYSQL process in order for it to come back online.

During this connection downtime, when using phpmyadmin on the mysql server shows no problem running queries etc.

View 2 Replies View Related

Ubuntu Servers :: FTP From Server To Remote File Server?

Jul 6, 2010

I support a small business which runs a headless Ubuntu Server (10.04 32bit) as a file server which is accessed by Windows machines.Although the company has it's own back-up procedure they have decided to back-up some (none sensitive) files online. The have chosen FileFactory (http://www.filefactory.com/) as the host for this. FileFactory allows files to be uploaded to their server by FTP however I do not know how to set this up on the server.

The idea, if it is possible, is to connect to FileFactory through FTP and then synchronise the data using an Rsync command.I normally access the server through Webmin and it has vsFTP installed. I can access the company's server by FTP from inside and outside of the network so I know that vsFTP is working for incomming connections however I cannot work out how to configure it to connect to the FileFactory server.

View 3 Replies View Related

General :: Script To Ftp A File To Remote Machine - Log The Output To A File?

Feb 5, 2010

I am using below script to ftp a file to remote machine

Code:

#!/bin/bash
ftp -nv <<EOF
open ${SERVER}

[code]....

When I execute the above file its working fine and displaying output on to the screen. How can I log the output to a file?

View 7 Replies View Related

Ubuntu :: Copying File To A Remote Ftp Server With Bash

Jan 10, 2011

I'm hoping to set up a cron job that takes a file and copies it to a remote password protected FTP server. I've got a command that formats the file with the correct name and I've put it in the anacron file in /etc/cron.d (which I think is right, haven't tested it yet).I'm not sure how to copy the file to a remote server though. I do actually have the ftp server bookmarked in my places menu. So is there a simple way of suppling a file path that will put it straight into that folder? The only problem I can see with this is that the connection won't be open continuously, so would need to be re-opened when needed (I could presumably save the password in the keyring so that I don't need to be there to type it in).

Or maybe set up a cron job that connects to and mounts the ftp server a minute before it has to copy the file over?

View 9 Replies View Related

Programming :: PHP - Connection To Remote Server To Edit File?

Mar 14, 2010

I have a webGUI in php where users can make certain settings. How can I edit a file on a remote server from my php webserver? Currently I use my FTP client, vsFTPd and a chrooted user in a specific directory where the file resides. I think this is pretty save as long a nobody else uses my FTPclient. How can I make changes to this file on the remote server from within my php-code on my webserver ?? (so that not I need to make the changes but my users can do it from a html-form) I found this but the credentials for the FTP-connection are plain :

<?php
$file = fopen ("ftp://loginasswd@server", "w");
if (!$file) {
echo "<p>Unable to open remote file for writing.
";

[code].....

I use https for the webGUI, but I guess this does not mean the connection to the remote server will be encrypted also ? Can I use my FTP-user (has no shell) from within php to edit the file ?

View 12 Replies View Related

Server :: Error. NT_STATUS_ACCESS_DENIED Opening Remote File History.txt

Sep 2, 2010

I have install samba server.Now i am trying to shift data from linux machine to windows machine.it gives following error. NT_STATUS_ACCESS_DENIED opening remote file history.txt firewall and iptables are also disabled.

View 1 Replies View Related

Ubuntu Servers :: Can't Connect To Server (file Or Remote Terminal) From Laptop

Jan 23, 2011

I have an ubuntu fileserver and an ubuntu laptop both running 10.10.For some reason I can't connect to the server (file or remote terminal) from the laptop, even though I can access ssh through terminal on my mac and have been able to mount the filesystem on another computer running the ubuntu liveCD. I just get the error 'no route to host'.I've tried turning off the firewall on the laptop and re-installing ssh on both computers, but I don't have a clue what to do next!

View 9 Replies View Related

Server :: Change A Line In A File And Send To A Remote Machine With Rsync?

Nov 20, 2010

I'm configuring an rsync between 2 machines, A_Server --> B_Server, using the following script:Quote:

#!/bin/bash
#
# Script de backup a trav�s de Rsync desde RMP-1 hasta RMP-2.

[code]....

View 6 Replies View Related

Server :: Append A Set (or Sets) Of Data To A File(or Files) On Remote Hosts?

Dec 26, 2009

If I need to append a set (or sets) of data to a file(or files) on remote hosts what is the best mechanism by which to do that? My first thought was ssh but the command syntax to append to a remote file isn't clear to me. Can anyone point me in the right direction here?

View 4 Replies View Related

General :: Access Remote Mysql Server Through Socks Proxy Server?

Aug 25, 2010

Scenario:A - Local Unix machineB - socks proxy server port 1080C - remote mysql server port 3306I want to connect to the remote mysql server(C) from local unix machine(A) using sock proxy(B).

View 1 Replies View Related

General :: Setup Remote Access Server On Red Hat Enterprise Server Release 5.1?

Aug 30, 2009

how i have a machine installed Red Hat Enterprise Linux Server release 5.1 with 2 modem (usb & com port) still i want to configure RAS server so some pple able to connect my server and send me some files.

View 4 Replies View Related

General :: Config File For New Remote?

Jun 3, 2011

i want to create new config file for remote using irrecordbut what are the steps please tell me about thathow to save config file?

View 4 Replies View Related

General :: Remote Copy File

Aug 3, 2010

I would like to use the command rcp to copy file from remote server ( linux ) to local pc , what is the command ?the remote server name is lnx_srv , the path is /tmp/ora_file1.txt , the linux login id is ora_usr , the .rhosts have released to ora_usr the localhost pc path is c:OraI read the help page of windows , tried the command rcp lnx_srv.ora_usr:/tmp/ora_file1.txt c:Ora , but not work , the error is "rsh: can't establish connection" , Can advise what is wrong ? what comamnd should i use ?

View 9 Replies View Related

General :: How To Connect To A Remote Server And Run Some Code On That Particular Server

Jun 30, 2011

I am implementing an automated backup scheme so I created a shell script which first creates SQL dumps for all MySQL databases, then retrieves all websites from the /var/www directory of a remote server. The latter is working as I am using rsync to get the remote files.However, the MySQL dumps being retrieved are the ones from the local server which is not what I want. I want to get the SQL dumps from the remote server as well.I have a tunnel between the local and remote server which I can connect to without using any password (I added the public key to the authorized_hosts), so I tried to add the following code to the script:

ssh user@192.168.x.xxx

I then attempted to retrieve the SQL dumps and exited from the remote server. However this does not work as I still have to enter exit manually in the terminal for the SQL dumps to be retrieved from the remote host. I don't know why this is happening. This is what the script is trying to do:

//connect to remote server
ssh user@192.168.x.xxx
//retrieve SQL dumps

[code]...

Is there a way to connect to the remote host AND run the script's code on THAT remote host?

View 2 Replies View Related

General :: Putting A Remote Syslog Into Its Own File?

Aug 11, 2010

I have a Tomato router and it has the capability to have its logs go to a external server. syslog is the obvious choice for this. So I enabled remote logging on my linux server's syslogd (syslogd -r) and I can see all of the logs in /var/log/syslog. What I want to do is take everything that comes from the IP of my router (10.0.0.1) and divert it to its own file like /var/log/tomato to avoid polluting my syslog with external logs.

I can't find any examples of someone doing this. My only solution is to get a script together that strips out any line in /var/log/syslog with 10.0.0.1 in it and puts the line into /var/log/tomato and have the script run as a cron job, but that seems unnecessarily messy.

Unless someone knows that there is a solution, I'm 95% sure that syslog doesn't support this after reading more in-depth of the man page. So I need to migrate to syslog-ng or make a crazy script that runs with cron.

View 3 Replies View Related

General :: Copy A File From Remote Directory

Aug 4, 2011

How to copy a file from remote to local directory and vice versa using ftp bat script file in telnet.

View 1 Replies View Related

General :: Remote Access File Transfer

Feb 12, 2011

If I enable compression when I use ssh to run remote X11 applications on a local display.

View 1 Replies View Related

General :: Remote Webserver And Sshd_config File?

May 5, 2011

I wanted to add a user to have permission to login to our webserver. Foolishly I did not back this file up. The only thing I changed was the last part of the file which was:

# override default of no subsystems
AllowUsers chris acosentino
Subsystem sftp /usr/libexec/openssh/sftp-server
to
# override default of no subsystems
AllowUsers acosentino techmaster
Subsystem sftp /usr/libexec/openssh/sftp-server

Now I'm still connected with that terminal, but any other attempt to get into the webserver from either a new terminal or from winscp results in:ssh_exchange_identification:Connection closed by remote host.If I lose connection to this last terminal I guess I'll be screwed.

View 2 Replies View Related

General :: Transfer File From Local Mac To Remote Machine

Aug 12, 2010

How do you transfer a file from a local Mac to a remote Linux machine

View 5 Replies View Related

General :: Remote File Copy Through Archiving Software ?

Oct 6, 2010

I need to back up a fold on a remote machine to my local box; the remote hd does not have enough space archive it, neither does my local box. I know there's a cantrip to pipe scp through gzip (or similar), but I don't remember the syntax.

View 1 Replies View Related

General :: Can't Locate Remote Server?

Jun 7, 2010

We are using linux (Ubuntu ) to host our website and mails. There was a power problem and after restarting our servers, we are unable to access the co. website. When i try to access the mail by typing mail.domain, i am able to access the login page from within the network. Someone out of the network is unable to find the page[URL]

View 4 Replies View Related

General :: Creating A Remote Server?

Apr 24, 2010

I'm new to the world of networking. Actually, I'm trying to change my desktop which has enough horse power to run heavy applications in to a server such that I may access it as a source safe server remotely (over the internet). I carry my laptop along all the times and would like to continue my development work when I find free time. I tried to find some help on google but was confused on which to follow and where to begin from.

View 3 Replies View Related

General :: Logging Into A Remote Server?

Jan 3, 2010

I want to login to my company's server (remote) from my room. I have the server address, so I use this command to login :

Code:
#ssh root@X.X.X.X

It waits for a very long time and then returns with error connection timed out port 22.

I configured these settings in the remote server :

Code:
#/etc/init.d/iptables stop

Then I connect via ssh from my home but still the same error.

Then in the config file /etc/ssh/sshd_config, I uncomment the line : ListenAddress 0.0.0.0

I connect via ssh again from home but still the same error.

The connection is not denied in hosts.deny and hosts.allow.

How do I get the connection up and running?

View 5 Replies View Related

General :: Accidentally Type Concatenate Large File On Remote System

May 6, 2010

Every once in a while on a computer I'm ssh'd into, I will accidentally type "cat largefile.txt" and my screen will start rushing with text for the next 10 minutes. I'm always working in a screen session, so my current solution is to just log out and then log back in, and since it can go 100X faster when I'm logged out, it'll finish in the short time it takes me to type my password in again. Is there a better way? Either involving the fact I'm in a screen session? Or a way to do this within SSH? What doesn't work: detaching from the screen session (doesn't respond until file is done outputting) trying command to move to a different window in the screen session (also doesn't respond) typing ctrl+C to kill cat command (also doesn't respond, probably because the command is done and the buffers just have to catch up).

View 3 Replies View Related

General :: Bash Script That Read From File And Ping Remote Host

Feb 13, 2011

Q=What will this do?
A=This will read from /root/Desktop/iplist (or anywhere you want to put the list) after it reads the ip it will ping the ip two times. If the remote host is up then it will write the ip to a log. If the ping fails it will display it on the screen, write the ip to syslog so that you can do remote logging, and last it will send the ip by email to a user or a group of users.

Code:
#!/bin/bash
#wrote by Zach Underwood feb-12-2011
#test and wrote on centos 5.5 with sendmail
rm -f /root/Desktop/iplog #This will remove the good iplog
exec 9</root/Desktop/iplist #put full path the file where ip list is. Make sure that the ips are listed one per line.
while read -u9 ip
do
ping -c 2 $ip > /dev/null 2> /dev/null # ping and discard output
if [ $? -eq 0 ]; then # check the exit code
echo "$ip is up" >> /root/Desktop/iplog #write the ip of the hosts that are up
else
echo "$ip is down" # will show on the screen the ips that are not up
logger -p auth.notice "$ip is down" # will write the down host to syslog
echo "$ip is down" | mail -v -s alert user@anydomain.com > /dev/null 2> /dev/null #will send mail users about host down
fi
done

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved