khaled83
khaled83

Reputation: 59

Scp with @ and : in username

I would like to know how can i use SCP with username like that :

coucou@kiki:SSH:myname

I'm trying with something like that:

scp "coucou@kiki:SSH:[email protected]:/var/log/apache /var/log1"

but I get the following error :

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

Upvotes: 2

Views: 1233

Answers (1)

Connor Bell
Connor Bell

Reputation: 194

I found that escaping the @ in the username using SSH worked, but SCP did not.

You can pass the underlying SSH options directly with the -o option with SCP. For example:

scp -o "User=coucou@kiki:SSH:myname" 11.1.1:/var/log/apache /var/log1

Upvotes: 4

Related Questions