You're creating an instance of A
, not a subclass. Your problem is that your instantiation is a little incorrect, although close.
Remove self
from the keyword arguments:
sub_B = A(host = 'example.com', port = 22, user = 'root', password = 'testing')
This should work fine.