can not issue any command on freesshd server - windows

I installed FreeSSHd server on my Windows XP machine. Then i started FreeSSHd and created a user. After that i runned Putty to connect my newly installed SSH server. I entered my created user name and password in putty. I successfully logged on but i couldn't execute any SSH commands with putty. Only HELP and DIR commands answer properly. Other SSH commands like LS, PWD, etc. returns error message such as "xxx command is an unknown command and can not be executed.".
My question is simple. How can execute SSH commands via Putty over FreeSSHd server on Windows machine. I want to simulate a file copy. I think i should execute SCP or PUT commands but i couldn't success.
Any ideas?

Commands like "ls" and "pwd" aren't "ssh commands", they're Unix commands. You'd expect for them to be available a Unix system (including Linux). MS Windows isn't a Unix system and doesn't provide those commands.
You can install these programs as third-party software if you like. Cygwin is a popular free package.

Related

How to login into ssh on windows cmd prompt

I am trying to login into one of the ethernet ports on my development board on ssh from my Windows pc. But it is displaying a message like
'ssh' is not recognized as an internal or external command when i tried to loging into it using ssh root#192.168.4.14.
How to get ssh into my windows system?
I use Linux Bash on my windows to use ssh.
You can install it from your windows configurations. But I think it is only for Windows 10 64bits.
Or if you want, you can install git desktop application. From this you can use linux commands into the git bash.
You can use the below command in command prompt to initiate ssh session.
ssh -l username 192.168.1.1

How to get bash ssh server started from psexec or user-logon script in windows 10

I have a W10 machine with bash set up. If I open a cmd window and type bash -i I can get to a bash shell no problem. However, if I enter the W10 machine using psexec and the same user and type bash -i, everything just hangs.
I know I can and do use an Ubuntu ssh server to get in, but I can only do that if the Ubuntu ssh server is running. It only seems to run if there is at least one bash session active. I thought I could use the psexec entry as a backup and start the Ubuntu ssh server or do anything else, but from the psexec cmd window, I cannot get to bash. When I type bash -i everything hangs and I need to close the cmd window on the remote machine.
The same problem occurs if I use a windows ssh server. I can get to a cmd window, but everything hangs if I type bash -i.
I also tried the Windows task scheduler to try to start the Ubuntu ssh server at a user login, but that also just hangs.

SSH into Windows 10 Bash only gets into DOS shell not Bash

I'm trying to ssh into windows 10 bash on my local machine.
When I do
ssh localhost I am prompted for my windows password and can then ssh into a DOS shell. How do I access bash from there?
The same occurs when I try to ssh from a cygwin terminal on another laptop on my home network. I am able to ssh into linux machines fine (from windows 10 bash)
Thank you!
When you enable Developer Mode you can see 2 new services are loaded on startup, SSHBroker and SSHProxy and they are bound to port 22. You can try disabling them and you should can do ssh localhost again.

How to include a sub-script in a remote shell from remote location?

I am running a local bootstrap.sh script from OSX on a remote Ubuntu server which does some "if else then" stuff to load a specific subscript.sh when a specific condition is met.
I am running that local script with:
ssh user#host "bash -s" <~/projects/projectname/bootstrap.sh
I am having issues with getting the subscript.sh sourced (loaded/included).
You can't. You're only sending the contents of bootstrap.sh to the remote shell. It's attempting to source subscript.sh on the remote machine, and it isn't there.
You'll need to either copy subscript.sh (or both scripts!) to the remote machine, or insert the contents of subscript.sh into bootstrap.sh in place of the source command.
What I would recommend is to rsync your 'bootstrap.sh' from your local computer to your server. You should be able to do this with your ssh credentials.
A very cool utility is Transmit. It is $25 and allows you to cleanly mount your server as if it were a portable hard drive (Transmit can also do synchronizations). All you need is ssh credentials and is very user friendly.
If you are allowed to install on your server, then I would install qsub on it. (Actually just check to see if it is installed.) Then just mount your computer's drive and you can submit scrips with qsub (I actually would just make a small server on your mac). This is what I use for using a linux cluster from my OSX computer.
Alternatively you can make a small server from your osx and have it mounted on your linux server.

Shell Script program to download files from linux remote server

I am very new in shell scripting , i want to download some files from linux remote server ,so how can i proceed for that.That remote server is ssh based .
first of all, ftp service is better choice to get files from remote server.
If only sshd service is available, then you may use ssh based command sftp or scp.
However, using sftp or scp commands will invoke an interactive password prompt, which is a problem in shell script --> You have to ask for help to expect command. see Automate scp file transfer using a shell script .
Besides expect, you may also set up trust relationship between two servers, then you may use scp without password. See http://www.linuxproblem.org/art_9.html

Resources