$ sftp -vv -F ~myname/.sshwmx -P 2004 yqfupbvzwc@mynetwork.net
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/MyName/.sshwmx
debug2: resolving "mymsge.net" port 2004
debug2: ssh_connect_direct
debug1: Connecting to mymsge.net [160.2.76.45] port 2004.
debug1: Connection established.
debug1: identity file /Users/MyName/.ssh/id_rsa type 0
debug1: identity file /Users/MyName/.ssh/id_rsa-cert type -1
debug1: identity file /Users/MyName/.ssh/id_dsa type -1
debug1: identity file /Users/MyName/.ssh/id_dsa-cert type -1
debug1: identity file /Users/MyName/.ssh/id_ecdsa type -1
debug1: identity file /Users/MyName/.ssh/id_ecds
Clearly indicating that .ssh was consulted when .sshwmx was asked for.
Eventually the error I get is: Permission denied (publickey). Which would be
correct because the wrong files were used.
Here is my setup.
In my home directory
$ ls -lad .sshwmx
drwx------ 7 MyName staff 224 Mar 19 11:23 .sshwmx
$ ls -la .sshwmx
total 48
-rwx------ 1 MyName staff 2237 Mar 19 11:18 config
-rwxr-x--- 1 MyName staff 569 Mar 19 09:30 ddd.mksh
-rwx------ 1 MyName staff 1675 Mar 19 09:30 id_rsa
-rwxr-x--- 1 MyName staff 392 Mar 19 09:30 id_rsa.pub
-rwxr-x--- 1 MyName staff 4962 Mar 19 09:30 known_hosts
$ uname -a
Darwin MacBook.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
$ cat .sshwmx/config
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
...
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# IdentityFile ~/.ssh/id_ecdsa
# IdentityFile ~/.ssh/id_ed25519
# IdentityFile ~/.sshwmx/identity
IdentityFile ~/.sshwmx/id_rsa
IdentityFile ~/.sshwmx/id_dsa
IdentityFile ~/.sshwmx/id_ecdsa
IdentityFile ~/.sshwmx/id_ed25519
# Port 22
# Protocol 2
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes