sub av_ssh { $av_obj_SSH->trace(-1); $av_obj_SSH->debug(1); $av_obj_SSH->connect($av_loc_ROUTER) or $av_obj_SSH->die_with_error; $av_tmp_STRING = $av_obj_SSH->check_hostkey('ask') or $av_obj_SSH->die_with_error; $av_obj_SSH->auth_publickey("newroot","$ENV{HOME}/.ssh/t_zertifikat_t_test_openssh.pub","$ENV{HOME}/.ssh/t_zertifikat_t_test_openssh.key") or $av_obj_SSH->die_with_error; $av_obj_SSH->disconnect(); } $av_obj_SSH = Net::SSH2->new() or die "SSH-Objekt konnte nicht erzeugt werden"; av_ssh(); exit (0);