I am pretty new to unix, so please bare with me...when i try to connect to my server running ubuntu server through terminal on my ubuntu workstation I get this error:bash: 22: command not foundthe command I type in to connect is :ssh user@ip 22then i get the response that asks for the user's pass, after i enter it i get promted with that error.I have tried resinstalling openssh-client by:sudo apt-get remove --purge openssh-clientsudo apt-get install openssh-clientalso tried updating my repos: - sudo apt-get updatesadly no result...
ssh error bash: 22: command not found
ubuntu;openssh;command not found
Port 22 is the standard port used to connect to sshd.  It is used by default, so unless you have configured your remote host to listen on a non-standard port in your sshd_config, then all you need to do is ssh user@ip.If your remote host were listening on port 2222, for instance, the syntax for specifying that would be ssh -p 2222 user@ip.  It looks like you are trying to do ssh -p 22 user@ip, but like I said, that is unnecessary because 22 is the default port that SSH tries to connect to.What your command is actually doing is trying to execute the non-existent command 22 on the remote host.  Everything after the ssh command is interpreted as a command to be executed on the remote host (and for best practices, should normally be enclosed in quotes).  For instance, ssh user@ip hostname would return the remote hostname, because it is executing that command on the remote machine and then exiting SSH back to your local shell.