scp from user A in machine 1 to user B in machine 2
Hi all, would like to find out how can i scp a file from user A in one host to user B in another host?
i know how to get it done if its from user A in machine 1 to user A in machine 2.
1)on machine 1, generate a key pair. put the private key in the .ssh directory.
2)put the public key in /home/A/.ssh/authorized_keys in machine 2.
now i have a situation of scp_ing a file from user A to B. user B does not exist in machine 1 and user A does not exist in machine 2.
what i think will work:
1) in A's home dir in machine 1, generate the key pair. place the private key in /home/A/.ssh
2) put the public key in /home/B/.ssh/authorized_keys. because the command i am using is
it should search in B's .ssh dir for the matching public key right?
Hi all, would like to find out how can i scp a file from user A in one host to user B in another host?
i know how to get it done if its from user A in machine 1 to user A in machine 2.
1)on machine 1, generate a key pair. put the private key in the .ssh directory.
2)put the public key in /home/A/.ssh/authorized_keys in machine 2.
now i have a situation of scp_ing a file from user A to B. user B does not exist in machine 1 and user A does not exist in machine 2.
what i think will work:
1) in A's home dir in machine 1, generate the key pair. place the private key in /home/A/.ssh
2) put the public key in /home/B/.ssh/authorized_keys. because the command i am using is
it should search in B's .ssh dir for the matching public key right?
You are right. The users on the source and destination systems do not have to be the same. What you are trying to do will work.
I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine.
for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Hi everyone! I want to be able to send a signal to another machine on the same network, and have it trigger a script on that machine. Here's the reason why I can't just ssh: I don't have a username on that machine, but there is a user that is always logged on that I can do stuff on.
So, I want... (5 Replies)
Hi all,
Really hope someone can help me, i have been trying lots of things and just cant seem to nail it - and for something that seems straight forward....
Anyway, scenario is I need to log onto a second machine (remote server) from main workstation. Once logged in I need to run a batch... (2 Replies)
HI,
I have parsed a file and stored all my machine name and user name in a list.
Now I want to change in the putty code such that the machine name and user name can be passed through calling that one by one from tht list through an object. Then pass it to the place the putty takes user name... (7 Replies)
I currently have a statistics gathering script i run on my Linux servers. One of the stat i gather is total memory in the machine. The script is all perl with the exception of gathering the memory for that i use the following command:
$ram = (`cat /proc/meminfo | grep "MemTotal" | awk... (1 Reply)
Hi All,
URGENT - Please help me form a scipt for this:
I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server)
I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Hi,
I need to login into remote server and execute a shell script over there.
As of now i am making use of ssh command
ssh primUser@135.254.242.2 sh /poll.sh
I am logging in as primUser but unless i change the user to root the script execution on the remote machine is not possible.
... (5 Replies)
Hi Experts,
We 4 to 5 people are using same UNIX(Solaris) login for our testing purpose. Also we are doing some modifications to existing scripts.
Is it possible to know the each user machine (IP address or machine name) who are using the same login to modify the scripts. So that we can... (12 Replies)
Hi All,
I am new to shell scripting.
Can someone let me know, how to check whether the user exists in the remote system?
I am building a new unix box and before I proceed installing the appliation , I want to check whether the required users are created in the system .
how to do this ?... (1 Reply)
Hi,
I want to execute a script - of different user from my script.
I have tried the su command
su - username -c "scriptname"
it works but asked for password.
Is there any way for supplying the password to it thru script, not interactively.
Or is there any other way to achieve the... (5 Replies)