Bad stdio forwarding specification '%h:%p

Solution 1:

Your config file as well as the command are wrong.

The ProxyCommand line should contain the JumpHost's user/hostname but not the final destination.

Config file:

Host db
  User dbuser
  HostName 192.168.1.111 #db host name/IP
  ProxyCommand ssh user_public_server@public_server -W %h:%p

Host website
  User websiteuser
  HostName 192.168.1.100 #website host name/IP
  ProxyCommand ssh user_public_server@public_server -W %h:%p

The command is then simply ssh db or ssh website because the user friendly Host's name (e.g. db) as defined in the config file is expanded to the HostName/IP (e.g. 192.168.1.111).