MobaXterm Execute Command - unix

To connect from windows desktop to unix host, in order of administration on command line level, I like to use MobaXterm in it's free version
The connection is encrypted ssh, identification to Unix host is using user id, passwd.
There is an issue in I can't resolve:
In the "Session Settings" is a field "Execute Command".
This command there is supposed to be executed in the target host when login has been successful finished. The hosts I have to use are may be not the fastest - Or MobaXterm is too fast.
However, the command is issued in a to early stage, the host feels mortally offended, closes connection and throws me out.
It does not matter what the command is - even a sleep is not accepted.
How to tell MobaXterm to act a bit slower?

MobaXterm default behavior for executing a command is to close the session after execution.
To prevent that there is a setting near the "Execute command" field that states: "Do not exit after command ends". Just check that and it will fix the problem.

Related

how to find mariadb port number in navicate

I have a mariadb installed on my system, and I want to connect it with spring boot using jpa, so I've forgot my port number
Can someone tell me how I can find it in navicate
If you haven't connected to the database using Navicat yet and you don't already have the port, then there's no way you can find out the port from Navicat.
If you are currently connected to the database through Navicat, simply click the connection tab and you'll be shown with this dialog Then you can see the port. Even if you're not using Navicat, most tools that I know of will always need a specific port for the database connection so if you ever save the connection info on the tools, and the port is unchanged, then you can find it there.
If you're using Windows, you can try this method:
a. Make sure the database service is running then open task manager > go to "details" tab and find process name "mysqld.exe" :
if you have multiple process, note down all of the "PID" numbers.
b. Open Command Prompt (as administrator if required) then type the following netstat -aon | findstr "PID" then press "Enter"; for example, the "PID" is 2668 so like this:
You might get result of two or more rows depending on the connection made to your database but the port will all be the same. In that example, the port is 4238, that is beside the word TCP:
Protocol
Local Address (local IP:port)
Foreign Address
State
PID
TCP
0.0.0.0:4238
0.0.0.0:0
LISTENING
2668
Another method you can try is simply checking the "my.ini/my.cnf" file. If you don't know where to locate that, in Windows, open "run" dialog and type "services.msc" then click "OK".
Find MariaDB/MySQL service name (or whatever custom service name you gave to it), right click it then select "Properties":
Once the "Properties" dialog open, highlight and drag your mouse to the right (end) at the text below the "Path to executable" area to locate where your "my.ini" file is.
You can just highlight the path where the "my.ini" file, paste in "Run" then click "OK" and the file will be opened:
You can find the port under [mysqld] and [client] section. Both should have the same port but depending on your MariaDB version, the information might not be the same as this screenshot:
Additional:
IF somehow you are connected to the database through a tool (like Navicat) and able to run query but (strangely) unable to check the connection properties, then you can execute this query to get the database port number: SHOW VARIABLES LIKE '%port%';

How to get over Keyboard-interactive authentication prompt in batch file for transferring files to SFTP server

I am trying to transfer some text files on SFTP Server using Putty command line option.
I have a batch file with the following commands:
(
echo cd /inbox
echo mput c:\temp\*.txt
echo bye
echo cd c:\temp\
echo del c:\temp\*.txt
) |echo open <username#ip> <port no> -pw password
However, when I execute the batch file I get stuck at "Keyboard interactive prompt from Server"
Appreciate any suggestions on how to get over this point to avoid manual intervention while executing this batch file?
I have figured out the reason i was experiencing this issue. I my password i had a special character ^ (power symbol), and while i had passed correct password in batch file it was somehow skipping only that ^ character in password. To overcome this I tried to provide password in batch within double quotes "password" and then my issue was resolved.
Just sharing my experience.
enter image description here
Well I had a similar problem when trying to use putty to make an ssh connection, exactly the same warning message "Keyboard interactive prompt from Server". I could write the username but it never accepted the password, also my external ip address did not even made connection, local ip server address worked but password always failed, I was prepared to make a restore from backup, but since I had physical contact with the server, I just plugged an USB Keyboard and "voilá" all problems ended. Maybe Kernel had not loaded the keyboard ascii software or something and somehow it is also needed on remote ssh connection.

odbcad32.exe Test Connection passes but program connection fails

I am trying to get a connection string right, and using odbcad32.exe to test the connection.
The trouble is, I get Connection Established, regardless of what password I enter.
This seems pretty useless.
My .NET program fails with Data source name not found and no default driver specified even though odbcad32.exe has no problem getting the connection.
Data Source Name : Test_Blah
Description: Test_Blah
Host Name: blh-housing
Port Number: 5060
Database name: ih
User ID: administrator
Driver: Progress OpenEdge 10.2b Driver
Password: (space)
This is my connection string:
<add name="BlhConnection" connectionString="DSN=Test_Blah;UID=Administrator;PWD=' ' ;" />
Any ideas how I can get this working?
32 bit ODBC Drivers and connections based on those are only accessible by 32 bit clients.
You are not mentioning your OS - but when your client application is a 64 bit application the 32 bit ODBC driver won't work. I am not 100% sure - but I doubt that there is a 64 bit ODBC driver for OpenEdge in 10.2B. On OpenEdge 11 that's no problem.
I would start by verifying that you have the correct login credentials. Especially since you state that you get the same result no matter what you use.
The easiest way to verify the credentials is to login to the db server and open a "proenv" session. Using proenv ensures that all of the Progress environment is correctly set. If it is a Windows server "proenv" is in the Progress or OpenEdge program group, if the server is UNIX you can run "$DLC/bin/proenv" from the command line. Once you are running a proenv shell you can then use the "sqlexp" tool that Progress provides to verify your connection string and credentials. For example:
sqlexp -user userName -password passWord -db dbName -S portNum

JSch connecting to ftp.secureftp-test.com

So, I used the example on http://www.jcraft.com/jsch/examples/Sftp.java and I was trying to connect to ftp.secureftp-test.com.
That destination is a valid testing SFTP server (as mentioned in secureftp-test dot com/). I confirmed it by connecting to the server through nautilus. I also made sure that the password on my program was correct as well.
But, when I run the program and it hits session.connect(), it just says "INFO: Connection established" then it becomes quiet for a minute then it return:
"com.jcraft.jsch.JSchException: connection is closed by foreign host"
I am pretty sure that it got stuck in the while loop of the library but I do not know why. I tried it against my local ftp server and it also had the same problem.
During the quiet moment, I can type. But pressing enter does not send anything to the server.
Has anyone heard or seen the same problem?
Okay, it seems that secureftp-test.com is NOT an sftp server. That is ftps server.
What I did instead was creating my own sftp:
http://wiki.vpslink.com/Configuring_vsftpd_for_secure_connections_(TLS/SSL/SFTP)
Then run the example code but making sure that I have these lines before doing session.connect:
String knownHostsFilename = "/home/yourname/.ssh/known_hosts";
jsch.setKnownHosts(knownHostsFilename);

SFTP action in FinalBuilder always gets disconnected

i have the final builder actions below
sftp connect
try
sftp create directory
finally
sftp disconnect
end
thing is the action always says "connection lost" at sftp create directory. i even insert a reconnect before that line but still the same.
You need to contact FinalBuilder support and they will in turn contact us as developers of SFTP component. The problem is in the server, which gets confused by certain request and forcefully closes connection. We can diagnose the problem but fixing it would require cooperation with FinalBuilder team so we can't support you directly.

Resources