putty

PHP / Bash: Creating PPK out of OpenSSH Key with passphrase

巧了我就是萌 提交于 2019-12-12 10:26:30
问题 I would like to create a php script that creates keys for ssh-authentication. I've started with a exec("ssh-keygen -b 1024 -t dsa -N *pwd* -f *path-to-file* -q"); to create the private and public-key-pair. No problem till here ;) Now I've to convert the OpenSSL-Key to the ppk-format of PuTTY (in the cmd, not in the GUI). If anyone have an Idea on how to manage that, please let me know. Thanks 回答1: If you were working with RSA keys you could do this (requires phpseclib): <?php include('Crypt

jpegtran whole directory

左心房为你撑大大i 提交于 2019-12-12 08:04:42
问题 I want to optimize the whole test folder with jpg images from a command line. I found this but it doesn't work: cd /home/site/html/update/test/ find . -exec jpegtran -optimize "{}" "{}.opti.jpg" "{}" \; I want to overwrite the existing images. Suggestions? Answer: find /img/path -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \; 回答1: Answer: find /img/path -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \; 来源: https://stackoverflow.com

How can I run an OpenGL application installed on a linux machine from my windows machine?

蹲街弑〆低调 提交于 2019-12-12 07:38:10
问题 In the spirit of being helpful, this is a problem I had and solved, so I will answer the question here. Problem I have: An application that has to be installed on on Redhat or SuSE enterprise. It has huge system requirements and requires OpenGL. It is part of a suite of tools that need to operate together on one machine. This application is used for a time intensive task in terms of man hours. I don't want to sit in the server room working on this application. So, the question came up... how

Change date format to dd/mm/yyyy in sql

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 02:29:26
问题 I have a table called users and In sql the format of date is yyyy-mm-dd there fore when I try to enter data from my website in dd/mm/yyyy format it just enters 0000--00-00 How do I change the format it sql? 回答1: SQL Server Example Link below has an easy explanation and there's an example if it helps SELECT convert(varchar, getdate(), 103) – dd/mm/yyyy Or try putting your column name in place of "datecolumn" CONVERT(varchar(19), datecolumn, 103) 回答2: in SQL Server, according to the article

Plink is not returning to command prompt when executing start_http

泪湿孤枕 提交于 2019-12-12 02:14:07
问题 I'm executing a command using Plink through a Perl file from a Windows machine. system("cmd /c c:\\plink.exe -batch -ssh -l $user_name @ $host_name -pw $pwd start_http"); Execution is hanging. When I execute the same command from command prompt, Plink is not returning to command prompt. Tried using & at the end of the command but no use. And I don't want to redirect output to any log file. Whereas "stop" command is working fine system("cmd /c c:\\plink.exe -batch -ssh -l $user_name @ $host

Sqlplus command is not working via plink

谁说我不能喝 提交于 2019-12-12 01:43:57
问题 I have a shell script in which I am using sqlplus command to fetch the data from database (Installed on Linux). same script is working fine on Linux environment. When I execute the script on window environment via using below batch file. set ORACLE_TERM=xterm set ORACLE_BASE=/home/pwcadm/app/pwcadm set ORACLE_HOME=/home/pwcadm/app/pwcadm/product/11.2.0/client_1 set ORACLE_HOSTNAME=kyora02.kymab.local set ORACLE_SID=orcl set ORA_NLS11=$ORACLE_HOME/nls/data set LANG=en_US.UTF-8 set PATH=/opt

Error with auto_increment while conneted to Postgres via psql and puTTY

末鹿安然 提交于 2019-12-12 01:32:45
问题 I'm getting this error in puTTY. Not sure why, looks right to me ... psql:pierre.sql:10: ERROR: syntax error at or near "AUTO_INCREMENT" LINE 2: c_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, ^ psql:pierre.sql:18: ERROR: syntax error at or near "AUTO_INCREMENT" LINE 2: r_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, --DROP TABLE customer, reservation; CREATE TABLE customer( c_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, c_ref VARCHAR(30) NOT NULL, f_name VARCHAR(30) NOT NULL, l_name

How does PUTTY/PLINK determine a command has returned?

南笙酒味 提交于 2019-12-12 01:31:32
问题 Is it newline? prompt? What exactly? Trying to run powershell over plink and the command executes but plink doesn't recognise its finished and the session hangs. Most curiously though, the command executes successfully when sent through the shell (via Putty). However, when sent via plink, the same command hangs... Any ideas? 回答1: Telnet is nearly a raw TCP connection. All Putty needs back is a response from the server. The rest is controlled by the shell and SSH/Telnet server. While your task

vim shows garbage characters on pressing arrow key after opening a file

落爺英雄遲暮 提交于 2019-12-12 01:26:05
问题 I am getting garbage characters on pressing of arrow keys when I open a vim file. I have also defined following in my ~/.vimrc : set nocompatible I am using putty for login. Is this a putty issue? Please help EDIT: if I remove my ~/.vimrc, then problem is also removed. 回答1: I have used following code as .vimrc file, and it has resolved all my problem. " When started as "evim", evim.vim will already have done these settings. if v:progname =~? "evim" finish endif " Use Vim settings, rather than

Putty: _tkinter.TclError: no display name and no diplay environment variable

对着背影说爱祢 提交于 2019-12-11 22:22:40
问题 Linked Question: Mac OS X: _tkinter.TclError: no display name and no $DISPLAY environment variable The above has the same issue but the answer to that doesn't apply to me. a.py from Tkinter import * root = Tk() canvas = Canvas(bg='white', width = 200, height = 200) canvas.pack() canvas.create_line(0, 0, 199, 199, fill="blue", width = 5) canvas.create_line(0, 199, 199, 0, fill="blue", width = 5) canvas.update() canvas.postscript(file = "x.ps") root.mainloop() a.py is on a remote server This