How do I sftp to a server if the username contains @ symbol

Pass the user name through the -o User option, or through the equivalent User directive in the client configuration file (~/.ssh/config).

sftp -o Port:8777 -o [email protected] example.com

This applies to ssh, scp and sshfs as well. Using the configuration file instead of -o options has the advantage of also working with tools that call ssh and don't let you easily pass command line options if at all.


sftp -o Port:8777 '[email protected]'@domain.com

This would also work, although its really quite poor form for them to provision users with this type of name.

Tags:

Sftp

Ssh

Users