Answer for KodeKloud Question - Linux Remote Copy

 One of the Nautilus developers has copied confidential data on the jump host in Stratos DC. That data must be copied to one of the app servers. Because developers do not have access to app servers, they asked the system admins team to accomplish the task for them.

Copy /tmp/nautilus.txt.gpg file from jump server to App Server 3 at location /home/webapp.

Answer:

#from jump host , first check the permission of the file and change it 

    cd /tmp/

    ls -l nautilus.txt.gpg

#change permission 

    chmod 777 nautilus.txt.gpg

#copy the file to app 3 server /tmp/ location using SCP command 

    scp /tmp/nautilus.txt.gpg <user>@<server IP>:/tmp/

* make sure the above <user> and <server IP> detail should be respective server in my case its app server 3 user and IP/hostname

# now login to app 3 server 

    ssh <user>@<server IP> 

* make sure the above <user> and <server IP> detail should be respective server in my case its app server 3 user and IP/hostname

# switch to root user

    sudo su 

# go to /tmp location and copy the file to correct location ( /home/webapp/)

    cd /tmp/

    cp  nautilus.txt.gpg  /home/webapp/

Note: Commands are correct but based on your question the server and user name, other details might differ so please do check

No comments:

Post a Comment

Featured Post

Answer for Kodekloud DEVOPS Questions - Init container in Kubernetes

Question: 1. Create a Deployment named as ic-deploy-devops. 2. Configure spec as replicas should be 1 , labels app should be ic-devops , ...