Skip to main content
edited tags; edited tags
Link
Gilles 'SO- stop being evil'
  • 866.1k
  • 205
  • 1.8k
  • 2.3k
deleted 1 character in body
Source Link
jlliagre
  • 62.5k
  • 11
  • 124
  • 162

I tried to copy the zipzip file from localhost to two remote machines, I aliased my remote hostsnameshostnames. Hence i

Hence I use the for loop like this

 for g in hy1 hy2;do scp kube.tar.gz $g:~;done

hy1,hy2- alias for remote hostnames

when iI ran this command, It returns the following error

ssh: Could not resolve hostname hy1: Name or service not known

lost connection

ssh: Could not resolve hostname hy2: Name or service not known

lost connection

ItsIs there any problem with using alias for file sharing, with loop ?

I tried to copy the zip file from localhost to two remote machines, I aliased my remote hostsnames. Hence i use the for loop like this

 for g in hy1 hy2;do scp kube.tar.gz $g:~;done

hy1,hy2- alias for remote hostnames

when i ran this command, It returns the following error

ssh: Could not resolve hostname hy1: Name or service not known

lost connection

ssh: Could not resolve hostname hy2: Name or service not known

lost connection

Its there any problem with using alias for file sharing, with loop ?

I tried to copy the zip file from localhost to two remote machines, I aliased my remote hostnames.

Hence I use the for loop like this

 for g in hy1 hy2;do scp kube.tar.gz $g:~;done

hy1,hy2- alias for remote hostnames

when I ran this command, It returns the following error

ssh: Could not resolve hostname hy1: Name or service not known

lost connection

ssh: Could not resolve hostname hy2: Name or service not known

lost connection

Is there any problem with using alias for file sharing, with loop ?

Source Link
SuperKrish
  • 845
  • 2
  • 14
  • 22

Alias not working with for loop

I tried to copy the zip file from localhost to two remote machines, I aliased my remote hostsnames. Hence i use the for loop like this

 for g in hy1 hy2;do scp kube.tar.gz $g:~;done

hy1,hy2- alias for remote hostnames

when i ran this command, It returns the following error

ssh: Could not resolve hostname hy1: Name or service not known

lost connection

ssh: Could not resolve hostname hy2: Name or service not known

lost connection

Its there any problem with using alias for file sharing, with loop ?