Need Commands For The Following Scenario

scenario: two servers A and B are connected together
server A can not send a file name F directly to server B
server B can send anything to server A

How can we copy or move the file F from server A TO B with all file permissions

Thanks for your kind help


Similar Content



Making A DB Backup And Send It To Another Server

Hello everyone;

At this time I need to make a sh script to make a db backup an send it to another server.

Thinking about this, I think I have to:
1.- Make a connection beetween the servers without password
2.- The scrip must to do:
a.- Make the mysqldump
b.- Put it in a gzip file
c.- Send througth scp the gzip file and ONLY when the copy has done the script have to delete the files that are 3 days old.

Could you help me with this?

Do you consider that is a good idea or you have a better one?

Thanks in advance.

How Can I Run An Executable File On A Remote Linux Server Using Putty?

Hi, I'm trying to run an executable file on a remote server using Putty? I downloaded PuTTY and connected through the Putty Configuration window with the SSH connection type selected. Once I connected, the cmd window disappeared so I assume I'm connected. Now I want to run an executable file on the remote server.

How can I run an executable file on my remote Linux server using Putty?

Thanks for any help with this.

How To Copy File From Remote Host To Local Host Then Delete From Remote Host

I have an expect script to SSH to a remote host and obtain some user inputs and information about the server/network configuration. The responses are saved in a text file that I then need to copy to my local host so that I can read the lines into variables for use in the parent shell script.

Is there a way to do this without needing to enter the username and password for the local host to use function scp? I have tried the following in my expect script to no avail:
Code:
spawn scp $usr@$host:$flnm .
expect {
	-re "(.*)assword:" { 
		send -s "$pswd\r"
	}
}

I have also tried to directly scp the file and enter the username and password to try to debug the issue, and that doesn't work either:
Code:
spawn scp file.txt user@host:file.txt
expect {
	-re "(.*)assword:" {
		send -s "password\r"
	}
	"you sure you want to continue connecting" {
		send -s "yes\r"
		exp_continue
	}
}

In both scenarios I have used exp_internal 1, and there are no errors. But I do not end up with the file on my local host.

Following the copy, I would like to delete the file from the remote host. Any suggestions on how to accomplish this?

Mail Server Help

Hi All,
Is there a way to mirror plesk mail server with another mail server like primary and secondary. The primary will be in our location with different IP address and the secondary will be with plesk with existing IP address but the domain name should be the same like how gmail has multiple IP addresses on different servers/locations. This is for high availability and to reduce the network bandwidth i.e if any of the server goes down we can still send/receive mails from another and when the server comes online which was offline then all mails should be replicated with each other i.e if primary was down then all new mails should be synced from secondary or if secondary was down then the sync should be from primary. Other thing is since primary will be with us, it will be much faster than secondary(plesk) in sending/receiving the mails. So expecting your kind help about the steps or url links to acheive the same as I don't have much experience on this. The present mail server using qmail on rhel 6.5 64 bit.

Installing .tar File Changes User And Group To A Numeric Value

I'm trying to install a tar file and as root, when I use the following tar commands

Code:
tar -xvfp file.tar

or 

tar -xf file.tar


For some reason, it strips out the user id and group id and replaces with the the following numbers: 544 for UID and 400 for GID.

Also, from what I'm reading, it looks like tar preverses permissions from one server to another, which I didn't know.

Because of this, I can't install this file, is there a way around this?

thanks

Centos 7 Public And Private Keys...

hi people,

i reinstalled my server with centos 7 to get familiar with it...

i have a laptop that im using cygwin on to ssh into the centos 7 server.

i ran ssh-keygen -t rsa on the server and now in .ssh i have a public and private key created.

i copied the public key from the server to my C:\cygwin64\home\Administrator\.ssh\known_hosts file

now when i input:
ssh userontheserver@serversip

it asks for the passphrase which i created when i did the keygen
on the server

when i put the passphrase in it says permission denied
and returns me to the command line

what am i doing wrong?

do i have the steps correct?

am i right in saying that you need to have the servers public key in your known_hosts file on the client computer to get communication working?

Urgent!! File Transfer From Windows To Linux Server Using Ftp

Dear All

I need your help.
I want to get a file from windows server using ftp.
Below is the script I have created but the connection is not established:

#!/bin/sh

lcd "directory in linux server"
USER="username of windows server"
PASS="password"

ftp -n "ip of windows server" <<EOF
user $USER $PASS

cd "C:\Users... directory in windows server where file is located"
bin
get test1234.txt

bye

EOF

I hope somebody can help me!
BR,

SSH ForceCommand

I am in the process of migrating from a Centos 5 to Centos 6 server. I have duo two factor authentication working on my original server via the ForceCommand parameter in my sshd_config file. SSH login prompts for password and immediately pushed duo authentication to phone.

On my new server, it appears the .bashrc file is executed before ForceCommand, as I migrated my .bashrc from original server to new server. This was not the case previously.

How do I force the ForceCommand to run before any profile dependent .bashrc's?

Thank you.

EXT4 File System @ Server Side & Ext3 External Storage

Hi guys

We are urgently moving Oracle application to a backup server for some patching etc. The backup server is installed with Oracle 6.6 64Bit linux with default partitions. We found that the system has ext4 file system, while our external storage through HBA interface/IBM is formatted with ext3 file system.
Hence, please let us know what kind of performances issues we may come across, or the same could be ignored?

regards

Linux Mail Server

Hello Guys,

I set up a mail server in a LINUX environment using iRedMail.The users can only send and receive e-mail throughout the local network, not from the Internet. I would like to know the steps to follow for the configuration. Also i want the windows users to be able to send and receive e-mails through that mail server.
Thanks to help...