diff --git a/README.md b/README.md
index 9d372d91..da81863b 100644
--- a/README.md
+++ b/README.md
@@ -13,21 +13,20 @@
-
+
# Overview
Termix is an open-source forever free self-hosted SSH (other protocols planned, see [Planned Features](#planned-features)) server management panel inspired by [Nexterm](https://github.com/gnmyt/Nexterm). Its purpose is to provide an all-in-one docker-hosted web solution to manage your servers in one easy place. I'm using this project to help me learn [React](https://github.com/facebook/react), [Vite](https://github.com/vitejs/vite-plugin-react), and [Docker](https://www.docker.com) but also because I could never settle on a server management software that I enjoyed to use.
> [!WARNING]
-> This app is in the VERY early stages of development. Expect bugs, data loss, and unexplainable issues! For that reason, I recommend you securely tunnel your connection through a VPN.
+> This app is in the VERY early stages of development. Expect bugs, data loss, and unexplainable issues! For that reason, I recommend you securely tunnel your connection to Termix through a VPN.
# Features
-- SSH (password auth only)
+- SSH
- Split Screen (Up to 4) & Tab System
# Planned Features
-- Key Auth for SSH
- VNC
- RDP
- SFTP (build in file transfer)
diff --git a/src/AddHostModal.jsx b/src/AddHostModal.jsx
index 5e3d976e..b7c65dc6 100644
--- a/src/AddHostModal.jsx
+++ b/src/AddHostModal.jsx
@@ -1,9 +1,32 @@
import PropTypes from 'prop-types';
import { CssVarsProvider } from '@mui/joy/styles';
-import { Modal, Button, FormControl, FormLabel, Input, Stack, DialogTitle, DialogContent, ModalDialog } from '@mui/joy';
+import { Modal, Button, FormControl, FormLabel, Input, Stack, DialogTitle, DialogContent, ModalDialog, Select, Option } from '@mui/joy';
import theme from './theme';
const AddHostModal = ({ isHidden, form, setForm, handleAddHost, setIsAddHostHidden }) => {
+ const handleFileChange = (e) => {
+ const file = e.target.files[0];
+ if (file) {
+ if (file.name.endsWith('.rsa') || file.name.endsWith('.key') || file.name.endsWith('.pem') || file.name.endsWith('.der') || file.name.endsWith('.p8') || file.name.endsWith('.ssh')) {
+ const reader = new FileReader();
+ reader.onload = (event) => {
+ setForm({ ...form, rsaKey: event.target.result });
+ };
+ reader.readAsText(file);
+ } else {
+ alert("Please upload a valid RSA private key file.");
+ }
+ }
+ };
+
+ const isFormValid = () => {
+ if (form.authMethod === 'Select Auth') return false;
+ if (!form.ip || !form.user || !form.port) return false;
+ if (form.authMethod === 'rsaKey' && !form.rsaKey) return false;
+ if (form.authMethod === 'password' && !form.password) return false;
+ return true;
+ };
+
return (
setIsAddHostHidden(true)}>
@@ -22,7 +45,7 @@ const AddHostModal = ({ isHidden, form, setForm, handleAddHost, setIsAddHostHidd