ssh - scp + error Name or service not known + custom port -


i have read lot of post problem still can not solve on side.

i have server used connect this:

$ ssh user@xxx.xx.xx.xxx -p yy 

user = not root

xxx.xx.xx.xxx = ipv4 of server

yy = custom port ssh

connexion works well.

i try make copy of folder local machine (ubuntu) server(ubuntu 14.04) this:

$ scp -r -p /home/user/my/folder/ ssh://user@xxx.xx.xx.xxx:yy/home/user/my/folder/on/server/ 

i error:

ssh: not resolve hostname ssh: name or service not known lost connection 

i guess connexion works well. happen? problem rights of folder?

for information, local machine both ipv4 , ipv6 address. that?

thank in advance help. jb

check manual page scp. describe usage of scp switches , options:

scp [...] [-p port] [[user@]host1:]file1 ... [[user@]host2:]file2 

your command should be:

$ scp -r -p -p yy /home/user/my/folder/ user@xxx.xx.xx.xxx:/home/user/my/folder/on/server/ 

note port comes -p yy, don't write ssh:// in front user , separate host remote path using colon (:).


Comments