diff --git a/homebrew/termix.rb b/Casks/termix.rb similarity index 80% rename from homebrew/termix.rb rename to Casks/termix.rb index 9522fa73..6f6d0d86 100644 --- a/homebrew/termix.rb +++ b/Casks/termix.rb @@ -1,8 +1,8 @@ cask "termix" do - version "VERSION_PLACEHOLDER" - sha256 "CHECKSUM_PLACEHOLDER" + version "1.9.0" + sha256 "8fedd242b3cae1ebfd0c391a36f1c246a26ecac258b02478ee8dea2f33cd6d96" - url "https://github.com/Termix-SSH/Termix/releases/download/release-#{version}-tag/termix_macos_universal_#{version}_dmg.dmg" + url "https://github.com/Termix-SSH/Termix/releases/download/release-#{version}-tag/termix_macos_universal_dmg.dmg" name "Termix" desc "Web-based server management platform with SSH terminal, tunneling, and file editing" homepage "https://github.com/Termix-SSH/Termix" diff --git a/README.md b/README.md index 0e9c10f0..80fc69e9 100644 --- a/README.md +++ b/README.md @@ -80,16 +80,16 @@ Supported Devices: - Windows (x64/ia32) - Portable - MSI Installer - - Chocolatey Package Manager (coming soon) + - Chocolatey Package Manager - Linux (x64/ia32) - Portable - AppImage - Deb - - Flatpak (coming soon) + - Flatpak - macOS (x64/ia32 on v12.0+) - - Apple App Store (coming soon) + - Apple App Store - DMG - - Homebrew (coming soon) + - Homebrew - iOS/iPadOS (v15.1+) - Apple App Store - ISO diff --git a/src/backend/database/routes/credentials.ts b/src/backend/database/routes/credentials.ts index df9ab936..60a53d9c 100644 --- a/src/backend/database/routes/credentials.ts +++ b/src/backend/database/routes/credentials.ts @@ -1,4 +1,7 @@ -import type { AuthenticatedRequest } from "../../../types/index.js"; +import type { + AuthenticatedRequest, + CredentialBackend, +} from "../../../types/index.js"; import express from "express"; import { db } from "../db/index.js"; import { sshCredentials, sshCredentialUsage, sshData } from "../db/schema.js"; @@ -1124,10 +1127,9 @@ router.post( async function deploySSHKeyToHost( hostConfig: Record, - publicKey: string, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _credentialData: Record, + credData: CredentialBackend, ): Promise<{ success: boolean; message?: string; error?: string }> { + const publicKey = credData.public_key as string; return new Promise((resolve) => { const conn = new Client(); @@ -1248,7 +1250,7 @@ async function deploySSHKeyToHost( .replace(/'/g, "'\\''"); conn.exec( - `printf '%s\\n' '${escapedKey}' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys`, + `printf '%s\\n' '${escapedKey} ${credData.name}@Termix' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys`, (err, stream) => { if (err) { clearTimeout(addTimeout); @@ -1510,7 +1512,7 @@ router.post( }); } - const credData = credential[0]; + const credData = credential[0] as unknown as CredentialBackend; if (credData.authType !== "key") { return res.status(400).json({ @@ -1519,7 +1521,7 @@ router.post( }); } - const publicKey = credData.public_key || credData.publicKey; + const publicKey = credData.public_key; if (!publicKey) { return res.status(400).json({ success: false, @@ -1601,7 +1603,6 @@ router.post( const deployResult = await deploySSHKeyToHost( hostConfig, - publicKey as string, credData, ); diff --git a/src/types/index.ts b/src/types/index.ts index 7adc1ab6..5d9f4980 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -119,6 +119,28 @@ export interface Credential { updatedAt: string; } +export interface CredentialBackend { + id: number; + userId: string; + name: string; + description: string | null; + folder: string | null; + tags: string; + authType: "password" | "key"; + username: string; + password: string | null; + key: string; + private_key?: string; + public_key?: string; + key_password: string | null; + keyType?: string; + detectedKeyType: string; + usageCount: number; + lastUsed: string | null; + createdAt: string; + updatedAt: string; +} + export interface CredentialData { name: string; description?: string;