Fixed ssh issue for kali and ssh into tmux

This commit is contained in:
n0mad1k
2025-05-12 13:33:46 -04:00
parent 140dbe6619
commit 7b7080288a
2 changed files with 3 additions and 4 deletions
-2
View File
@@ -177,8 +177,6 @@
- proto: tcp - proto: tcp
ports: ports:
- 22 - 22
- 80
- 443
- "{{ havoc_teamserver_port | default(40056) }}" - "{{ havoc_teamserver_port | default(40056) }}"
- "{{ havoc_http_port | default(8080) }}" - "{{ havoc_http_port | default(8080) }}"
- "{{ gophish_admin_port }}" - "{{ gophish_admin_port }}"
+3 -2
View File
@@ -1641,7 +1641,7 @@ def ssh_to_instance(config):
ssh_users = [config.get('ssh_user')] ssh_users = [config.get('ssh_user')]
elif config['provider'] == 'aws': elif config['provider'] == 'aws':
# For AWS, try multiple common usernames # For AWS, try multiple common usernames
ssh_users = ['kali', 'ec2-user', 'ubuntu', 'root'] ssh_users = ['kali']
elif config['provider'] == 'linode': elif config['provider'] == 'linode':
ssh_users = ['root'] ssh_users = ['root']
else: else:
@@ -1667,7 +1667,8 @@ def ssh_to_instance(config):
"-o", "IdentitiesOnly=yes", "-o", "IdentitiesOnly=yes",
"-o", "ConnectTimeout=10", "-o", "ConnectTimeout=10",
"-i", ssh_key, "-i", ssh_key,
f"{ssh_user}@{ip}" f"{ssh_user}@{ip}",
"tmux"
] ]
# Execute SSH command with timeout # Execute SSH command with timeout