Skip to content

Commit 808da0b

Browse files
committed
fix add hosts key file
1 parent 261c7ae commit 808da0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ssh_utilities/connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ def add_hosts(cls, hosts: Union["_HOSTS", List["_HOSTS"]]):
243243
for h in hosts:
244244
if not isinstance(h["identityfile"], list):
245245
h["identityfile"] = [h["identityfile"]]
246+
h["identityfile"] = os.path.abspath(
247+
os.path.expanduser(h["identityfile"])
248+
)
246249

247250
cls.available_hosts.update({h["hostname"]: h for h in hosts})
248251

0 commit comments

Comments
 (0)