def connection_failed(errno=None, errstr=None):
	"""
	Construct a template for SSH on connection failed
	"""
	tpl = { 'ssh-event': 'connection-failed' }
	if errno is not None:
		tpl['error-no'] = errno
	if errstr is not None:
		tpl['error-str'] = errstr
	return tpl