4

I have a unix svr A:

username: uname
password: pwd

then there are some files under /usr/local/jboss/configuration which are accessible only when a 'sudo su' command is performed. (and the username changes to root@svrname ,also no password prompted for this command)

Now, I am trying to execute the below command which is trying to copy the file available under /usr/local/jboss/configuration to my local machine.

pscp -pw pwd root@svrname:/usr/local/jboss/configuration/xyz.xml C:\Users\downloads\

but this command prompts for password, m clueless. Please help!!

3 Answers 3

0

how did you set the variable pwd (should be $pwd)? does it have special characters? check that carefully and echo $pwd to make sure that it has your exact password.

then take a look a look at your auth or secure log on the server to see what error you are getting. it should tell you if your password is accepted or not.

also, make sure your root user can log into remotely (not a good idea, but if the server is only accessible in your internal network then it is fine).

1
  • the pwd isn't a variable, sorry if this confused you. the password to login to the svr is 'pwd' that's what I meant here
    – suraj
    Commented Aug 27, 2012 at 9:34
0

It's likely that your ssh server is configured to disallow remote root logins. Check your /etc/ssh/sshd_config on the server.

0

how about coying the files some place where "uname" can access them

uname@svrname:~$ sudo cp -r /usr/local/jboss/ ~/
uname@svrname:~$ sudo chown -R uname ~/jboss/

and then on your windows machine:

pscp -pw pwd uname@svrname:~/jboss/configuration/xyz.xml C:\Users\downloads\

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .