I have a folder in ~/apps/ and another one in the root /apps/
I want to ssh to them
ssh user@abc.com:~/apps/
and
ssh user@abc.com:/apps/
I got the following error:
Could not resolve hostname
What did I do wrong?
|
I have a folder in ~/apps/ and another one in the root /apps/ I want to ssh to them
and
I got the following error:
What did I do wrong?
| |||||||||
feedback
|
This question came from our site for professional and enthusiast programmers.
| |||
|
feedback
|
|
I think you are mixing scp and ssh For ssh you do not need to specify the destination path. You just log in as user@host.com and you land into the user's home folder. | |||
|
feedback
|
|
SSH expects the following syntax:
so when you typed:
SSH understood that you want to connect to a host named "abc.com:~/apps/" with a user "user". Since that host does not exist, you receive the error you quoted. You will have to break your command into two like this:
| |||
|
feedback
|
|
Edit: You can always ssh as user@abc.com and then just navigate to the desired folder using cd folderName Ozair Kafray explained it better | |||
|
feedback
|