Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
function install () {
sudo ssh $1 '
cd /rpm;
scp john@serverZ:/opt/rpm/src/package.rpm .;
exit;
'
}
case "$1" in
insPckg)
for server in $(cat ServerList);
do
install $server
done
;;
esac
this is just a one time thingy so dont want to install cssh stuff now to do it.
instead of scp I just did ls -l and it shows the directory listing of /rpm.
I think its just can't provide me the terminal to take my password as input hence failing since its a session inside another one. I can see the STDOUT but can't input in that one.
the question was during generation of private/public keys you can enter a passphrase, but you are not forced to enter any text in it (that means you can leave it empty). I wanted to ask if that passphrase is empty for you or not. Probably you did not set it at all.
Anyway, if you want scp to ask for password (because passwordless login was not configured) you will need to run it from a terminal. That's why you got no tty.
I am getting an error like this:
"permission denied, please try again
permission denied, please try again
permission denied (gssapi-keyex, gssapi-with-mic,password)"
the scenario is:
I logged into my config server X and from there I am running the script to login to several servers where they are missing some packages which I will scp from Server Z. The scp command is giving me this error.
Code:
ssh $1 '
cd /rpm;
scp john@serverY1:/opt/rpm/src/package.rpm;
exit;
'
wondering why its getting permission denied as I am giving the right credentials.
Thanks in advance.
Hi tanveer have u solved this scp problem.I am also facing the same problem.Any help from your side
I have some restriction in my environment for which I can't implement any passwordless ssh logins so had to do it manually and it was only one time thingy.
But definitely as everyone else said its possible to do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.